Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AshlinRejo/64519862b4e306e9f41918088f8cecda to your computer and use it in GitHub Desktop.
Save AshlinRejo/64519862b4e306e9f41918088f8cecda to your computer and use it in GitHub Desktop.
Woo Discount: Load regular price (for on sale) strikeout in product page
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