Created
November 26, 2018 09:10
-
-
Save AshlinRejo/64519862b4e306e9f41918088f8cecda to your computer and use it in GitHub Desktop.
Woo Discount: Load regular price (for on sale) strikeout in product page
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
if(!function_exists('woo_discount_rules_price_strikeout_before_discount_price_method')){ | |
function woo_discount_rules_price_strikeout_before_discount_price_method($item_price, $product){ | |
$regular_price = $product->get_regular_price(); | |
$item_price = wc_price($regular_price).$product->get_price_suffix(); | |
return $item_price; | |
} | |
} | |
add_filter('woo_discount_rules_price_strikeout_before_discount_price', 'woo_discount_rules_price_strikeout_before_discount_price_method', 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment