Created
July 5, 2021 09:09
-
-
Save Balakrishnan-flycart/53c4543cccbef17ca445f334b7b8fe5c to your computer and use it in GitHub Desktop.
Woo Discount Rules v2 - Reverse strike out
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('advanced_woo_discount_rules_strikeout_price_html', function($html, $original_price, $discounted_price, $is_variable_product, $initial_price_html, $separator){ | |
if($initial_price_html){ | |
$html = '<ins>' . $discounted_price . '</ins>'. $separator .'<del>' . $initial_price_html . '</del>' ; | |
}else{ | |
$html = '<ins>' . $discounted_price . '</ins>'. $separator .'<del>' . $original_price . '</del>' ; | |
} | |
return $html; | |
}, 10, 6); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment