woocommerce_product_is_on_sale хук-фильтр . WC 1.0
Использование
add_filter( 'woocommerce_product_is_on_sale', 'filter_function_name_398', 10, 2 ); function filter_function_name_398( $on_sale, $that ){ // filter... return $on_sale; }
- $on_sale
- -
- $that
- -
Где вызывается хук
woocommerce_product_is_on_sale
woocommerce_product_is_on_sale
woocommerce_product_is_on_sale
woocommerce/includes/abstracts/abstract-wc-product.php 1566
return 'view' === $context ? apply_filters( 'woocommerce_product_is_on_sale', $on_sale, $this ) : $on_sale;
woocommerce/includes/class-wc-product-grouped.php 73
return 'view' === $context ? apply_filters( 'woocommerce_product_is_on_sale', $on_sale, $this ) : $on_sale;
woocommerce/includes/class-wc-product-variable.php 511
return 'view' === $context ? apply_filters( 'woocommerce_product_is_on_sale', $on_sale, $this ) : $on_sale;