Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Remove fields on creation of bookable product
- This topic has 20 replies, 2 voices, and was last updated 5 years, 10 months ago by WCFM Forum.
- AuthorPosts
- February 8, 2019 at 10:46 am #47231andreasenglowskiParticipant
Hi, i want to remove certain fields / areas from the vendor dashboard on creation of a new bookable product. First u want to remove certain fields in booking options. And Did make some Screenshot for you hope that explains well.
Thanks in advance,
AndiAttachments:
You must be logged in to view attached files. - February 8, 2019 at 2:59 pm #47280WCFM ForumMember
Hi,
You may hide these fields using this filter – “wcfm_wcbokings_general_fields”
Thank You
- February 8, 2019 at 3:45 pm #47285andreasenglowskiParticipant
Wow thats great thanks for fast reply thats exactly what i was looking for. One last question: is it safe to change the code in the class-wcfm-wcbookings.php or how do i use the filter? Sorry if this question is nebish…
Thanks,
Andi - February 8, 2019 at 4:03 pm #47286WCFM ForumMember
Hi,
You are welcome ๐
Please use filter, if you edit code then update will remove those changes.
Thank You
- February 8, 2019 at 4:06 pm #47287andreasenglowskiParticipant
Okay sorry if its stupid but can you give a quick help on how to use the filter? For example remove min duration and max duration.
Thanks in advance,
Andi - February 8, 2019 at 4:21 pm #47289WCFM ForumMember
Hi,
Please add this code to your child theme’s functions.php –
add_filter( 'wcfm_wcbokings_general_fields', function( $booking_fields, $product_id ) { $booking_fields = wcfm_hide_field( '_wc_booking_calendar_display_mode', $booking_fields ); $booking_fields = wcfm_hide_field( '_wc_booking_requires_confirmation', $booking_fields ); $booking_fields = wcfm_hide_field( '_wc_booking_user_can_cancel', $booking_fields ); return $booking_fields; }, 50, 2 );
Thank You
- February 10, 2019 at 5:30 am #47490andreasenglowskiParticipant
thank you so much, its working great! now is there also a filter to remove fields of availability tab for bookable product?
thanks in advance
Attachments:
You must be logged in to view attached files. - February 10, 2019 at 6:21 am #47504WCFM ForumMember
Hi,
Off course there has filter.
But which fields you want to hide/remove?
Thank You
- February 10, 2019 at 6:29 am #47510andreasenglowskiParticipant
Did mark them for you, please see screenshot.
Many thanks
Attachments:
You must be logged in to view attached files. - February 10, 2019 at 6:31 am #47513WCFM ForumMember
- February 10, 2019 at 6:32 am #47515andreasenglowskiParticipant
blazing fast thanks man <3
oh and one small last thinge which is not about bookable produkt but is it possible to remove the โtabs managerโ tab? did look in groups permissions but did not find it… than i am all happy ๐
- February 10, 2019 at 6:36 am #47517WCFM ForumMember
Hi,
That’s visible because you are using “WC Tabs Manager” plugin.
Do you want to disable this for your vendors?
Then please add this line to your site –
add_filter( 'wcfm_is_allow_wc_tabs_manager', '__return_false' );
Thank You
- February 10, 2019 at 6:39 am #47518andreasenglowskiParticipant
Thats what i was looking for!
Thank you very very much, great support!!
Best regards,
Andi - February 10, 2019 at 6:58 am #47519WCFM ForumMember
You are welcome and have a great weekend ๐
- February 10, 2019 at 1:01 pm #47548andreasenglowskiParticipant
Thanks man you too! Just realized that theres one more small i want to get rid off: is it possible to remove the quantity field from the bookable product resource tab? Many many thanks!!
- February 10, 2019 at 1:45 pm #47553WCFM ForumMember
- February 10, 2019 at 3:39 pm #47586andreasenglowskiParticipant
Oh sorry i was mistaking, its inside the resource management. Did attach you screenshots, hope that helps to clear things out ๐
Thank you very much and have a nice day!
Attachments:
You must be logged in to view attached files. - February 11, 2019 at 6:20 am #47666WCFM ForumMember
Thanks, please use this code snippet –
add_filter( 'resource_manager_fields_general', function( $resource_fields ) { $resource_fields = wcfm_hide_field( 'qty', $resource_fields ); return $resource_fields; }, 50 );
Thank You
- February 12, 2019 at 12:51 pm #47902andreasenglowskiParticipant
Hi,
many thanks, everything is working just perfect but now my client did ask to remove the whole availabity tab. Is that possible that too?
If not, would it be possible to add some custom text in the availibity tab before or after the fields?Thanks in advance,
Andi - February 12, 2019 at 1:49 pm #47906andreasenglowskiParticipant
Sorry please delete the old post above (#47902). Three more question since my customer changed his mind:
– Just in general: Would it possible to remove the whole Availability tab?
– Is it possible to change even more fields in the Availability tab? Please see Screen1
– Is it possible to remove the fields with the label and if customer can pick resource (on creation of bookable when resource is enabled)? Please see Screen2Thanks in advance,
AndiAttachments:
You must be logged in to view attached files. - February 14, 2019 at 10:19 am #48131WCFM ForumMember
HI,
Well, such changes are comes under paid customization.
If you are interested may contact us here – https://wclovers.com/woocommerce-multivendor-customization/
Thank You
- AuthorPosts
- The topic ‘Remove fields on creation of bookable product’ is closed to new replies.