Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WC Vendors › How to reduce bookable product setup options?
- This topic has 6 replies, 2 voices, and was last updated 4 years, 6 months ago by eritechdeveloper.
- AuthorPosts
- May 4, 2020 at 5:21 pm #126483eritechdeveloperParticipant
There are a lot of options, which I am grateful for, but I would like to reduce it to the bare minimum at the start.
How can I preset certain options, disable certain options for example, and rename certain titles? For instance, I want to preset bookings to be cancelled up to 24 hours, remove block cost, and rename Base cost to price. This is not the full list, but if you guide me on how to do these I am sure, I can figure out the rest.
Thank you.
- May 4, 2020 at 7:50 pm #126548Sarmistha ChakrabortyMember
Hello,
I want to preset bookings to be cancelled up to 24 hours
>> For this,add_filter('wcfm_wcbokings_general_fields',function($fields,$vendor_id){ $fields['_wc_booking_user_can_cancel']['dfvalue'] = 'yes'; $fields['_wc_booking_cancel_limit']['value'] = 24; $fields['_wc_booking_cancel_limit_unit']['value'] = 'hour'; return $fields; },10,2);
remove block cost, and rename Base cost to price
>>For this,add_filter('wcfm_wcbokings_cost_fields',function($fields,$product_id){ $fields['_wc_booking_cost']['label'] = __('Price', 'woocommerce-bookings'); unset($fields['_wc_booking_block_cost']); return $fields; },10,2);
Add this above 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/Please be advised,before removing random fields for setup Booking product some fields are required field (https://docs.woocommerce.com/document/creating-a-bookable-product/)
Thanks.
- May 4, 2020 at 10:54 pm #126624eritechdeveloperParticipant
Thank you for your response Sarmistha,
All that worked like a dream, I would like to remove some more fields, but before I do. Please help me with the following issue that I posted here.
- May 5, 2020 at 5:40 pm #127006eritechdeveloperParticipant
Hi Sarmistha,
Can you help me with the document to do the following for code snippets, or help me with the code snippets.
Default Booking duration to fixed blocks of and remove the dropdown for fixed blocks off
Default can be cancelled to yes and hide it
Default can be cancelled up until 24 hours and hide it
Default Calendar display mode to “display calendar on click” and hide it
Default max bookings per block to 1 and hide it
Default all dates are to not available by default and hide it
Change “rules” in the availability tab to Service Available
Change minimum block bookable to earliest availability
Change maximum block bookable to latest availability
Change require a buffer period of to “Add a break between bookings”
Remove adjacent buffering
Remove restrictable selectable days
Remove restricted days
Remove first block starts at
Remove availability rules
Remove Display cost
Remove Cost rules
Rename “Cost” tab to price
Remove advanced tab as long as enable reviews is defaulted
Remove tags
Remove Catalog Visibility
Remove block costThanks,
Robel - May 5, 2020 at 7:26 pm #127050Sarmistha ChakrabortyMember
Hello,
This is not possible using code snippet.
It requires good amount custom development, and this will be a paid one.
If you are interested then please contact us here –https://wclovers.com/setup-guidance/ with requirement.Thank You
- May 5, 2020 at 7:45 pm #127057eritechdeveloperParticipant
Thank you for your response, I have sent a request.
- May 6, 2020 at 9:10 pm #127593eritechdeveloperParticipant
I understand you guys at the moment is there any way we can reduce some of them using snippets and the rest we can look at after when you got time.
- AuthorPosts
- You must be logged in to reply to this topic.