wcv_custom_user_fields

Description

apply_filters( 'wcv_custom_user_fields', array( $attributes ) )

Parameters (1) ( array )

Sample

array( 
    'store_general' => array( 
      'title'   => __( 'Store General' ),   
      'fields'  => array( 
      '_wcv_verified_vendor' => array(
        'label'       => __( 'Verified Vendor', 'wcvendors-pro' ),
        'description' => __( ' Check to publish that this vendor is verified by the store admin..', 'wcvendors-pro' ),
        'type'      => 'checkbox', 
      ),
      '_wcv_trusted_vendor' => array(
        'label'       => __( 'Trusted Vendor', 'wcvendors-pro' ),
        'description' => __( ' Check to allow this vendor to publish products immediately regardless of global publishing rules.', 'wcvendors-pro' ),
        'type'      => 'checkbox', 
      ),
      '_wcv_untrusted_vendor' => array(
        'label'       => __( 'Untrusted Vendor', 'wcvendors-pro' ),
        'description' => __( ' Check to require all products submitted to be reviewed, regardless of global publishing rules. This overrides the trusted vendor option.', 'wcvendors-pro' ),
        'type'      => 'checkbox', 
      ),
      '_wcv_company_url' => array(
        'label'       => __( 'Store Website / Blog URL', 'wcvendors-pro' ),
        'description' => ''
      ),
    ), 
  ), 
  'store_address' => array( 
    'title'   => __( 'Store Address' ),   
    'fields'  => array( 
      '_wcv_store_address1' => array(
        'label'       => __( 'Address 1', 'wcvendors-pro' ),
        'description' => ''
      ),
      '_wcv_store_address2' => array(
        'label'       => __( 'Address 2', 'wcvendors-pro' ),
        'description' => ''
      ),
      '_wcv_store_city' => array(
        'label'       => __( 'City', 'wcvendors-pro' ),
        'description' => ''
      ),
      '_wcv_store_postcode' => array(
        'label'       => __( 'Postcode', 'wcvendors-pro' ),
        'description' => ''
      ),
      '_wcv_store_country' => array(
        'label'       => __( 'Country', 'wcvendors-pro' ),
        'description' => '',
        'class'       => 'js_field-country',
        'type'        => 'select',
        'options'     => array( '' => __( 'Select a country…', 'wcvendors-pro' ) ) + WC()->countries->get_allowed_countries()
      ),
      '_wcv_store_state' => array(
        'label'       => __( 'State/County', 'wcvendors-pro' ),
        'description' => __( 'State/County or state code', 'wcvendors-pro' ),
        'class'       => 'js_field-state'
      ),
      '_wcv_store_phone' => array(
        'label'       => __( 'Telephone', 'wcvendors-pro' ),
        'description' => ''
      ),
    ), 
  ),
  'store_social' => array( 
    'title'   => __( 'Store Social' ),  
    'fields'  => array( 
      '_wcv_twitter_username' => array(
        'label'       => __( 'Twitter', 'wcvendors-pro' ),
        'description' => __( '<a href="https://twitter.com/">Twitter</a> username without the url.', 'wcvendors-pro' ), 
      ), 
      '_wcv_instagram_username' => array(
        'label'       => __( 'Instagram', 'wcvendors-pro' ),
        'description' => __( '<a href="https://instagram.com/">Instagram</a> username without the url.', 'wcvendors-pro' ), 
      ), 
      '_wcv_facebook_url' => array(
        'label'       => __( 'Facebook', 'wcvendors-pro' ),
        'description' => __( '<a href="https://facebook.com/">Facebook</a> url.', 'wcvendors-pro' ), 
      ),
      '_wcv_linkedin_url' => array(
        'label'       => __( 'LinkedIn', 'wcvendors-pro' ),
        'description' => __( '<a href="https://linkedin.com/">LinkedIn</a> url.', 'wcvendors-pro' ), 
      ),
      '_wcv_youtube_url' => array(
        'label'       => __( 'YouTube', 'wcvendors-pro' ),
        'description' => __( '<a href="https://youtube.com/">Youtube</a> url.', 'wcvendors-pro' ), 
      ),
      '_wcv_googleplus_url' => array(
        'label'       => __( 'Google+', 'wcvendors-pro' ),
        'description' => __( '<a href="https://plus.google.com">Google+</a> url.', 'wcvendors-pro' ), 
      ),
      '_wcv_pinterest_url' => array(
        'label'       => __( 'Pinterest', 'wcvendors-pro' ),
        'description' => __( '<a href=https://www.pinterest.com/">Pinterest</a> url.', 'wcvendors-pro' ), 
      ),
      '_wcv_snapchat_username' => array(
        'label'       => __( 'Snapchat', 'wcvendors-pro' ),
        'description' => __( 'Snapchat username.', 'wcvendors-pro' ), 
      ), 
  
    ), 
  ), 
));

 

Usage Examples

To run the filter, copy this sample

$array_val = apply_filters( 'wcv_custom_user_fields', array( $vars ) ... ) ;
  if ( ! empty( $array_val ) ) {

    // what has been modified...

}

To make a callback function, copy this sample

// the filter_wcv_custom_user_fields callback
function my_filter_function( $param )  {
  // do your thing here :-) ... 

  return $array_val;
}
add_filter( 'wcv_custom_user_fields' , 'my_filter_function', 10, 1 );

To remove the filter, copy this sample

 //remove the filter
remove_filter( 'wcv_custom_user_fields', 'my_filter_function', 10, 1 );

Defined

This filter is defined in the following source file(s)

  • wcvendors-pro/admin/class-wcvendors-pro-admin-vendor-controller.php line 66
    return $fields = apply_filters( 'wcv_custom_user_fields', array(

filters

Updated on January 9, 2017

Was this article helpful?