Delete and shuffle Customer Support fields

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!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM – Ultimate Delete and shuffle Customer Support fields

Viewing 1 reply thread
  • Author
    Posts
    • #127445
      Henriette
      Participant

      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.
    • #128265
      Henriette
      Participant

      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/

Viewing 1 reply thread
  • You must be logged in to reply to this topic.