woocommerce_cart_contents_weight
Usage
add_filter( 'woocommerce_cart_contents_weight', 'wp_kama_woocommerce_cart_contents_weight_filter' );
/**
* Function for `woocommerce_cart_contents_weight` filter-hook.
*
* @param $weight
*
* @return
*/
function wp_kama_woocommerce_cart_contents_weight_filter( $weight ){
// filter...
return $weight;
}
- $weight
- -
Where the hook is called
woocommerce_cart_contents_weight
woocommerce/includes/class-wc-cart.php 746
return apply_filters( 'woocommerce_cart_contents_weight', $weight );