Remove fields on creation of bookable product

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 20 reply threads
  • Author
    Posts
    • #47231
      andreasenglowski
      Participant

      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,
      Andi

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

      Hi,

      You may hide these fields using this filter – “wcfm_wcbokings_general_fields”

      https://ibb.co/bNjx4Sb

      Thank You

    • #47285
      andreasenglowski
      Participant

      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

    • #47286
      WCFM Forum
      Member

      Hi,

      You are welcome ๐Ÿ™‚

      Please use filter, if you edit code then update will remove those changes.

      Thank You

    • #47287
      andreasenglowski
      Participant

      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

    • #47289
      WCFM Forum
      Member

      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

    • #47490
      andreasenglowski
      Participant

      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.
    • #47504
      WCFM Forum
      Member

      Hi,

      Off course there has filter.

      But which fields you want to hide/remove?

      Thank You

    • #47510
      andreasenglowski
      Participant

      Did mark them for you, please see screenshot.

      Many thanks

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

      Hi,

      Use this filter – “wcfm_wcbokings_availability_fields”

      https://ibb.co/Y0DvmKK

      Thank You

    • #47515
      andreasenglowski
      Participant

      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 ๐Ÿ™‚

    • #47517
      WCFM Forum
      Member

      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

    • #47518
      andreasenglowski
      Participant

      Thats what i was looking for!

      Thank you very very much, great support!!

      Best regards,
      Andi

    • #47519
      WCFM Forum
      Member

      You are welcome and have a great weekend ๐Ÿ™‚

    • #47548
      andreasenglowski
      Participant

      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!!

    • #47553
      WCFM Forum
      Member

      HI,

      Which you refer as quantity field at Resource Tab? https://ibb.co/MCtdJNr

      Thank You

    • #47586
      andreasenglowski
      Participant

      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.
    • #47666
      WCFM Forum
      Member

      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

    • #47902
      andreasenglowski
      Participant

      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

    • #47906
      andreasenglowski
      Participant

      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 Screen2

      Thanks in advance,
      Andi

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

      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

Viewing 20 reply threads
  • The topic ‘Remove fields on creation of bookable product’ is closed to new replies.