Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Ultimate › Delete and shuffle Customer Support fields
- This topic has 1 reply, 1 voice, and was last updated 4 years, 7 months ago by Henriette.
Viewing 1 reply thread
- AuthorPosts
- May 6, 2020 at 5:11 pm #127445HenrietteParticipant
Hi,
A while ago you helped me with deleting and shuffling Address Fields in Vendor Dashboard > Location
add_filter( 'wcfm_marketplace_settings_fields_address', function( $fields ) { if ( ! current_user_can( 'administrator' ) ) { $shuffled_fields = array(); if ( isset( $fields['street_1'] ) ) $shuffled_fields['street_1'] = $fields['street_1']; if ( isset( $fields['zip'] ) ) $shuffled_fields['zip'] = $fields['zip']; if ( isset( $fields['city'] ) ) $shuffled_fields['city'] = $fields['city']; if ( isset( $fields['state'] ) ) { $shuffled_fields['state'] = $fields['state']; $shuffled_fields['state']['type'] = 'hidden'; } if ( isset( $fields['country'] ) ) { $shuffled_fields['country'] = $fields['country']; $shuffled_fields['country']['type'] = 'hidden'; } return $shuffled_fields; } return $fields; }, 10 ); add_filter( 'wcfmmp_store_address_string', function( $store_address, $vendor_data ) { $address = array(); if ( ! empty( $vendor_data['address'] ) ) { if ( isset( $vendor_data['address']['street_1'] ) ) $address[] = $vendor_data['address']['street_1']; if ( isset( $vendor_data['address']['street_2'] ) ) $address[] = $vendor_data['address']['street_2']; $postcode_city = ''; if ( isset( $vendor_data['address']['zip'] ) ) $postcode_city = $vendor_data['address']['zip']; if ( isset( $vendor_data['address']['city'] ) ) $postcode_city .= " " . $vendor_data['address']['city']; if($postcode_city) $address[] = trim( $postcode_city ); if ( isset( $vendor_data['address']['state'] ) ) $address[] = $vendor_data['address']['state']; } return implode( ', ', array_filter( $address ) ); }, 10, 2 );
I was wondering if you could do the same with the fields in Vendor Dashboard > Customer Support?
Some fields I don’t need and other fields I would like to reorder.
Please see attachment.Thank you in advance.
Attachments:
You must be logged in to view attached files. - May 8, 2020 at 10:38 am #128265HenrietteParticipant
Maybe it’s not necessary after all and you can spare your time and afford on this.
Please see this topic: https://wclovers.com/forums/topic/issue-and-question-about-customer-support/
- AuthorPosts
Viewing 1 reply thread
- You must be logged in to reply to this topic.