Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Ultimate › Disable address field
- This topic has 9 replies, 2 voices, and was last updated 3 years, 8 months ago by
WCFM Forum.
- AuthorPosts
- July 6, 2019 at 9:14 am #71290
Дмитрий Шаханов
ParticipantGood day!
I want to disable some sddress fields on the vendor setup page. How can I do this?
- July 6, 2019 at 9:37 am #71299
WCFM Forum
KeymasterHi,
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
- July 6, 2019 at 10:15 am #71303
Дмитрий Шаханов
ParticipantThank you!
But I want to disable state.
I change (city to state) code, but I have issue fieldfunction 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’ ); - July 7, 2019 at 9:13 am #71391
WCFM Forum
KeymasterHi,
Sorry, state can’t be disabled. It’s related to country!
Thank You
- July 7, 2019 at 6:40 pm #71418
Дмитрий Шаханов
ParticipantWell, then I need to turn off this block completely.
- July 8, 2019 at 8:01 am #71510
WCFM Forum
KeymasterOK, you may disable Address/Location from WCFM Capability for vendors.
- July 8, 2019 at 8:23 am #71518
Дмитрий Шаханов
ParticipantI need to disable only Address.
Location should be visible. - July 8, 2019 at 8:32 am #71522
WCFM Forum
KeymasterHi,
Use this code –
add_filter( 'wcfm_marketplace_settings_fields_address', function( $address_fields, $user_id ) { return array(); }, 50, 2 )
Thank You
- July 8, 2019 at 8:56 am #71527
Дмитрий Шаханов
ParticipantThank 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 - July 13, 2019 at 5:38 am #72208
WCFM Forum
KeymasterHI,
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
- AuthorPosts
- You must be logged in to reply to this topic.