woocommerce_attribute_label
Usage
add_filter( 'woocommerce_attribute_label', 'wp_kama_woocommerce_attribute_label_filter', 10, 3 );
/**
* Function for `woocommerce_attribute_label` filter-hook.
*
* @param $label
* @param $name
* @param $product
*
* @return
*/
function wp_kama_woocommerce_attribute_label_filter( $label, $name, $product ){
// filter...
return $label;
}
- $label
- -
- $name
- -
- $product
- -
Where the hook is called
woocommerce_attribute_label
woocommerce/includes/wc-attribute-functions.php 216
return apply_filters( 'woocommerce_attribute_label', $label, $name, $product );
Where the hook is used in WooCommerce
woocommerce/includes/wc-core-functions.php 48
add_filter( 'woocommerce_attribute_label', 'wp_kses_post', 100 );
woocommerce/src/Blocks/Shipping/PickupLocation.php 46
add_filter( 'woocommerce_attribute_label', array( $this, 'translate_meta_data' ), 10, 3 );