woocommerce_product_is_on_sale
Usage
add_filter( 'woocommerce_product_is_on_sale', 'wp_kama_woocommerce_product_is_on_sale_filter', 10, 2 ); /** * Function for `woocommerce_product_is_on_sale` filter-hook. * * @param $on_sale * @param $that * * @return */ function wp_kama_woocommerce_product_is_on_sale_filter( $on_sale, $that ){ // filter... return $on_sale; }
- $on_sale
- -
- $that
- -
Where the hook is called
woocommerce_product_is_on_sale
woocommerce_product_is_on_sale
woocommerce_product_is_on_sale
woocommerce/includes/abstracts/abstract-wc-product.php 1682
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;
woocommerce/includes/class-wc-product-grouped.php 73
return 'view' === $context ? apply_filters( 'woocommerce_product_is_on_sale', $on_sale, $this ) : $on_sale;