How to display bookings but not editable

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WC Bookings How to display bookings but not editable

This topic contains 10 replies, has 2 voices, and was last updated by WCFM Forum WCFM Forum 2 months, 4 weeks ago.

  • Author
    Posts
  • #78821
    Avatar
    contact8732
    Participant

    Hi, I have enabled Vendors to be able to see the list of customer bookings (so that they can see the times). But at the moment the Vendor can click on the order number or eye icon and then they are taken to a screen where the vendor can edit the booking status and time etc. I want the vendor to not be able to edit.

    In the Capability settings, if I disable Manage Bookings, then the Bookings tab seems to disappear so the Vendor can not see the bookings list.

    Could you advise please?

    Thanks for your help

    Attachments:
    You must be logged in to view attached files.
  • #79168
    WCFM Forum
    WCFM Forum
    Keymaster

    Hi,

    Please do not disable any capability setting. Add this lines to your site –

    add_filter( 'wcfm_is_allow_booking_status_update', '__return_false' );
    add_filter( 'wcfm_is_allow_booking_schedule_update', '__return_false' );

    Thank You

  • #79379
    Avatar
    contact8732
    Participant

    This is great – thank you

  • #79408
    Avatar
    contact8732
    Participant

    How do I allow the vendor to cancel the booking (during the cancellation period I defined), so that the Store Admin and Customer receive a notification of cancellation? Thank you

  • #79666
    WCFM Forum
    WCFM Forum
    Keymaster

    HI,

    Well, Customers are allowed to “Cancel” booking during that defined duration.

    Thank You

  • #79726
    Avatar
    contact8732
    Participant

    How/where can the Vendor cancel the booking? Thanks

  • #79951
    WCFM Forum
    WCFM Forum
    Keymaster

    Hi,

    Vendor may update Booking status to “cancelled” – https://ibb.co/n30MrZ0

    Thank You

  • #80099
    Avatar
    contact8732
    Participant

    Ah I see – thanks for the response. Could you advise how to not display the following statuses in that dropdown please: “Unpaid”, “Pending confirmation”, “Confirmed”, “In Cart”? Thank you

  • #80446
    WCFM Forum
    WCFM Forum
    Keymaster

    HI,

    Please use this code for the purpose –

    add_filter( 'wcfm_allowed_booking_status', function( $booking_statuses ) {
    	if( wcfm_is_vendor() ) {
    		unset( $booking_statuses['unpaid'] );
    		unset( $booking_statuses['pending-confirmation'] );
    		unset( $booking_statuses['confirmed'] );
    		unset( $booking_statuses['in-cart'] );
    	}
    	return $booking_statuses;
    }, 50, 2 );

    Add this code to your child theme’s functions.php
    In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/

    Thank You

  • #81228
    Avatar
    contact8732
    Participant

    Thank you 🙂

  • #81724
    WCFM Forum
    WCFM Forum
    Keymaster

    You are always welcome 🙂

    Let me know if there’s anything else we can help you with.
    Can we ask for a favor? Would you mind taking a few minutes to review our plugin at https://wordpress.org/support/plugin/wc-multivendor-marketplace/reviews/ and let others know about your 5 Star experience with WCFM Marketplace. Also, follow us on Twitter https://twitter.com/wcfmmp for more exciting news, important updates, and irresistible offers.  

You must be logged in to reply to this topic.