Viewing 1 replies (of 1 total)
  • Plugin Author WPClever

    (@wpclever)

    Hi @kattlegaspi

    Please add below snippet (How to add custom code?):

    add_filter( 'woovr_variation_price', 'woovr_variation_price_with_saved', 99, 2 );
    function woovr_variation_price_with_saved( $price, $product ) {
    	if ( $product->is_on_sale() ) {
    		$percentage = round( 100 - ( 100 * ( $product->get_sale_price() / $product->get_regular_price() ) ) );
    		$price      .= ' (SAVE ' . $percentage . '%)';
    	}
    
    	return $price;
    }

    And the result https://www.screencast.com/t/o9a15629AW

Viewing 1 replies (of 1 total)
  • The topic ‘Add sale text’ is closed to new replies.