woocommerce_show_variation_price хук-фильтр . WC 1.0
See if prices should be shown for each variation after selection.
Использование
add_filter( 'woocommerce_show_variation_price', 'filter_function_name_3903', 10, 3 ); function filter_function_name_3903( $condition, $that, $variation ){ // filter... return $condition; }
- $condition
- -
- $that
- -
- $variation
- -
Где вызывается хук
woocommerce_show_variation_price
woocommerce/includes/class-wc-product-variable.php 361
$show_variation_price = apply_filters( 'woocommerce_show_variation_price', $variation->get_price() === '' || $this->get_variation_sale_price( 'min' ) !== $this->get_variation_sale_price( 'max' ) || $this->get_variation_regular_price( 'min' ) !== $this->get_variation_regular_price( 'max' ), $this, $variation );