Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WC Bookings › How to display bookings but not editable
- This topic has 10 replies, 2 voices, and was last updated 4 years, 6 months ago by WCFM Forum.
- AuthorPosts
- August 28, 2019 at 7:39 pm #78821contact8732Participant
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. - August 30, 2019 at 7:37 am #79168WCFM ForumKeymaster
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
- August 31, 2019 at 9:53 pm #79379contact8732Participant
This is great – thank you
- September 1, 2019 at 7:49 am #79408contact8732Participant
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
- September 2, 2019 at 3:17 pm #79666WCFM ForumKeymaster
HI,
Well, Customers are allowed to “Cancel” booking during that defined duration.
Thank You
- September 2, 2019 at 11:50 pm #79726contact8732Participant
How/where can the Vendor cancel the booking? Thanks
- September 4, 2019 at 8:30 am #79951WCFM ForumKeymaster
- September 4, 2019 at 6:18 pm #80099contact8732Participant
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
- September 6, 2019 at 4:55 pm #80446WCFM ForumKeymaster
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
- September 11, 2019 at 11:56 pm #81228contact8732Participant
Thank you 🙂
- September 15, 2019 at 1:27 am #81724WCFM ForumKeymaster
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. Â
- AuthorPosts
- You must be logged in to reply to this topic.