wcv_product_categories

Description

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

Parameters (1) (array)

Sample

array( 
  'post_id'     => $post_id, 
  'id'        => 'product_cat[]', 
  'taxonomy'      => 'product_cat', 
  'show_option_none'  => $show_option_none,
  'taxonomy_args'   => array( 
              'hide_empty'  => 0, 
              'orderby'   => 'order',           
              'exclude'   => $exclude, 
            ),  
  'label'       => ( $multiple ) ? __( 'Categories', 'wcvendors-pro' ) : __( 'Category', 'wcvendors-pro' ), 
  'custom_attributes' => $custom_attributes, 
  ) 
)

 

Usage Examples

To run the filter, copy this sample

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

    // what has been modified...

}

To make a callback function, copy this sample

// the filter wcv_product_categories callback
function filter_wcv_product_categories( array( $attributes ) ) {
  // do your thing here :-) ... 

  return $array_val;
}
add_filter( 'wcv_product_categories', 'filter_wcv_product_categories', 10, 1 );

To remove the filter, copy this sample

 //remove the filter
remove_filter( 'wcv_product_categories', 'filter_wcv_product_categories', 10, 1 );

Defined

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

  • wcvendors-pro/public/forms/class-wcvendors-pro-product-form.php line 413
    WCVendors_Pro_Form_Helper::select2( apply_filters( 'wcv_product_categories', array( $attributes ) )

filters

Updated on January 9, 2017

Was this article helpful?