wc_product_weight_enabled
Returns whether or not product weights are enabled.
Использование
add_filter( 'wc_product_weight_enabled', 'wp_kama_wc_product_weight_enabled_filter' );
/**
* Function for `wc_product_weight_enabled` filter-hook.
*
* @param $true
*
* @return
*/
function wp_kama_wc_product_weight_enabled_filter( $true ){
// filter...
return $true;
}
- $true
- -
Где вызывается хук
wc_product_weight_enabled
woocommerce/includes/wc-product-functions.php 111
return apply_filters( 'wc_product_weight_enabled', true );