(hook_prefix)weight
Использование
add_filter( '(hook_prefix)weight', 'wp_kama_hook_prefixweight_filter', 10, 2 );
/**
* Function for `(hook_prefix)weight` filter-hook.
*
* @param $parent_data_weight
* @param $that
*
* @return
*/
function wp_kama_hook_prefixweight_filter( $parent_data_weight, $that ){
// filter...
return $parent_data_weight;
}
- $parent_data_weight
- -
- $that
- -
Где вызывается хук
(hook_prefix)weight
woocommerce/includes/class-wc-product-variation.php 238
$value = apply_filters( $this->get_hook_prefix() . 'weight', $this->parent_data['weight'], $this );