Disable address field

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 9 reply threads
  • Author
    Posts
    • #71290

      Good day!

      I want to disable some sddress fields on the vendor setup page. How can I do this?

      http://prntscr.com/obbx0c

    • #71299
      WCFM Forum
      Keymaster

      Hi,

      Please use this code –

      function wcfm_marketplace_settings_fields_hide( $address_fields ) {
      	$address_fields = wcfm_hide_field( 'street_1', $address_fields );
      	$address_fields = wcfm_hide_field( 'street_2', $address_fields );
      	$address_fields = wcfm_hide_field( 'zip', $address_fields );
      	$address_fields = wcfm_hide_field( 'city', $address_fields );
      	return $address_fields;
      }
      add_filter( 'wcfm_marketplace_settings_fields_address', 'wcfm_marketplace_settings_fields_hide' );
      add_filter( 'wcfm_membership_registration_fields_address', 'wcfm_marketplace_settings_fields_hide' );
      add_filter( 'wcfm_wcmarketplace_settings_fields_customer_support', 'wcfm_marketplace_settings_fields_hide' );

      Thank You

    • #71303

      Thank you!
      But I want to disable state.
      I change (city to state) code, but I have issue field

      http://prntscr.com/obcdij

      function wcfm_marketplace_settings_fields_hide( $address_fields ) {
      $address_fields = wcfm_hide_field( ‘street_1’, $address_fields );
      $address_fields = wcfm_hide_field( ‘street_2’, $address_fields );
      $address_fields = wcfm_hide_field( ‘zip’, $address_fields );
      $address_fields = wcfm_hide_field( ‘state’, $address_fields );
      return $address_fields;
      }

      add_filter( ‘wcfm_marketplace_settings_fields_address’, ‘wcfm_marketplace_settings_fields_hide’ );
      add_filter( ‘wcfm_membership_registration_fields_address’, ‘wcfm_marketplace_settings_fields_hide’ );
      add_filter( ‘wcfm_wcmarketplace_settings_fields_customer_support’, ‘wcfm_marketplace_settings_fields_hide’ );

    • #71391
      WCFM Forum
      Keymaster

      Hi,

      Sorry, state can’t be disabled. It’s related to country!

      Thank You

    • #71418

      Well, then I need to turn off this block completely.

    • #71510
      WCFM Forum
      Keymaster

      OK, you may disable Address/Location from WCFM Capability for vendors.

    • #71518

      I need to disable only Address.
      Location should be visible.

      http://prntscr.com/obzp5f

    • #71522
      WCFM Forum
      Keymaster

      Hi,

      Use this code –

      add_filter( 'wcfm_marketplace_settings_fields_address', function( $address_fields, $user_id ) {
      return array();
      }, 50, 2 )

      Thank You

    • #71527

      Thank you!
      I have one more questions.

      How can I move a custom menu to submenu
      And I want to disable progress bar
      http://prntscr.com/oc08ss

    • #72208
      WCFM Forum
      Keymaster

      HI,

      Tabs can not be added as submenu.

      Add this line to disable progress bar

      add_filter( 'wcfm_is_allow_profile_complete_bar', '__return_false' );

      Thank You

Viewing 9 reply threads
  • You must be logged in to reply to this topic.