Answers for "woocommerce_product_is_on_sale filter"

PHP
0

woocommerce_product_is_on_sale filter

// define the woocommerce_product_is_on_sale callback 
function custom_woocommerce_product_is_on_sale( $on_sale, $instance ){ 
   //custom code here
    return $on_sale
} 

//add the action 
add_filter('woocommerce_product_is_on_sale', 'custom_woocommerce_product_is_on_sale', 10, 2)
Posted by: Guest on March-03-2022

Browse Popular Code Answers by Language