rpress_is_discount_active

Author: RestroPress 329 views

This filter can be used to check if the discount is active or not. The filter accepts two parameters: It returns true or false.

return apply_filters( ‘rpress_is_discount_active’, $return, $this->ID );

The sample below shows an example of how you could modify it:

function rpress_is_discount_active_callback( $return, $id ) {  
    return $return = true; 
}

add_filter( 'rpress_is_discount_active', 'rpress_is_discount_active_callback', 10, 2 );