woocommerce_format_weight
Usage
add_filter( 'woocommerce_format_weight', 'wp_kama_woocommerce_format_weight_filter', 10, 2 );
/**
* Function for `woocommerce_format_weight` filter-hook.
*
* @param $weight_string
* @param $weight
*
* @return
*/
function wp_kama_woocommerce_format_weight_filter( $weight_string, $weight ){
// filter...
return $weight_string;
}
- $weight_string
- -
- $weight
- -
Where the hook is called
woocommerce_format_weight
woocommerce/includes/wc-formatting-functions.php 1424
return apply_filters( 'woocommerce_format_weight', $weight_string, $weight );