Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Remove county / state text and input field in wizard
- This topic has 1 reply, 2 voices, and was last updated 5 years, 3 months ago by WCFM Forum.
- AuthorPosts
- January 13, 2019 at 6:58 pm #43384Michael Gimm HoldensenGuest
Hi
We don’t use county/state in Denmark and so I want to remove it.
I found another post and figured I needed to add the below code. Problem is, that the input field still remains (text did disappear).Also tried adding this CSS, but didn’t work… input#state {display: none !important;}Code:
function wcfm_marketplace_settings_fields_0410_address( $address_fields ) {
if( isset( $address_fields[‘state’] ) ) {
$address_fields[‘state’][‘class’] = ‘wcfm_custom_hide’;
$address_fields[‘state’][‘label_class’] = ‘wcfm_custom_hide’;
}
return $address_fields;
}
add_filter( ‘wcfm_marketplace_settings_fields_address’, ‘wcfm_marketplace_settings_fields_0410_address’ );
add_filter( ‘wcfm_membership_registration_fields_address’, ‘wcfm_marketplace_settings_fields_0410_address’ ); - January 14, 2019 at 3:36 pm #43484WCFM ForumKeymaster
Hi,
Please use this code –
function wcfm_marketplace_settings_fields_0410_address( $address_fields ) { $address_fields = wcfm_hide_field( 'state', $address_fields ); if( isset( $address_fields['state'] ) ) unset( $address_fields['state'] ); return $address_fields; } add_filter( 'wcfm_marketplace_settings_fields_address', 'wcfm_marketplace_settings_fields_0410_address' ); add_filter( 'wcfm_membership_registration_fields_address', 'wcfm_marketplace_settings_fields_0410_address' );
Thank You
- AuthorPosts
- The topic ‘Remove county / state text and input field in wizard’ is closed to new replies.