wcv_order_billing_fields

Description

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

Parameters (1) (array)

Sample

array(
  'first_name' => array(
    'label' => __( 'First Name', 'wcvendors-pro' ),
    'show'  => false
  ),
  'last_name' => array(
    'label' => __( 'Last Name', 'wcvendors-pro' ),
    'show'  => false
  ),
  'company' => array(
    'label' => __( 'Company', 'wcvendors-pro' ),
    'show'  => false
  ),
  'address_1' => array(
    'label' => __( 'Address 1', 'wcvendors-pro' ),
    'show'  => false
  ),
  'address_2' => array(
    'label' => __( 'Address 2', 'wcvendors-pro' ),
    'show'  => false
  ),
  'city' => array(
    'label' => __( 'City', 'wcvendors-pro' ),
    'show'  => false
  ),
  'postcode' => array(
    'label' => __( 'Postcode', 'wcvendors-pro' ),
    'show'  => false
  ),
  'country' => array(
    'label'   => __( 'Country', 'wcvendors-pro' ),
    'show'    => false,
    'class'   => 'js_field-country select short',
    'type'    => 'select',
    'options' => array( '' => __( 'Select a country…', 'wcvendors-pro' ) ) + WCVendors_Pro_Form_Helper::countries()
  ),
  'state' => array(
    'label' => __( 'State/County', 'wcvendors-pro' ),
    'class'   => 'js_field-state select short',
    'show'  => false
  ),
  'email' => array(
    'label' => __( 'Email', 'wcvendors-pro' ),
  ),
  'phone' => array(
    'label' => __( 'Phone', 'wcvendors-pro' ),
  ),
)

 

Usage Examples

To run the filter, copy this sample

$array_val = apply_filters( 'wcv_order_billing_fields', array( $attributes ) );
  if ( ! empty( $array_val ) ) {

    // what has been modified...

}

To make a callback function, copy this sample

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

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

To remove the filter, copy this sample

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

Defined

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

  • wcvendors-pro/public/class-wcvendors-pro-order-controller.php line 125
    self::$billing_fields = apply_filters( 'wcv_order_billing_fields', array(

filters

Updated on January 9, 2017

Was this article helpful?