woocommerce_attribute_label

The WooCommerce Simply Order Export woocommerce attribute label hook.

Description

apply_filters( 'woocommerce_attribute_label', (unknown) $wc_attribute_label, (unknown) $meta_meta_key ); 

Parameters (2)

0. $wc_attribute_label (unknown) => wc_attribute_label( $meta['meta_key'], $_product )
The wc attribute label.
1. $meta_meta_key (unknown)
The meta meta key.

Usage

To run the hook, copy the example below.
  1. $wc_attribute_label = apply_filters( 'woocommerce_attribute_label', $wc_attribute_label, $meta_meta_key ); 
  2.  
  3. if ( !empty( $wc_attribute_label ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_attribute_label callback 
  2. function filter_woocommerce_attribute_label( $wc_attribute_label, $meta_meta_key ) { 
  3. // make filter magic happen here... 
  4. return $wc_attribute_label
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_attribute_label', 'filter_woocommerce_attribute_label', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_attribute_label', 'filter_woocommerce_attribute_label', 10, 2 ); 

Defined (1)

The filter is defined in the following location(s).

/classes/class-order-export-process.php  
  1. $meta['meta_key'] = apply_filters( 'woocommerce_attribute_label', wc_attribute_label( $meta['meta_key'], $_product ), $meta['meta_key'] );