Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sarancartrabbit/549bfc1e9d84878b0e246d22a3f6f02f to your computer and use it in GitHub Desktop.
Save sarancartrabbit/549bfc1e9d84878b0e246d22a3f6f02f to your computer and use it in GitHub Desktop.
Woo Discount Rules: Show only discount price
add_filter('advanced_woo_discount_rules_strikeout_price_html', function ($html, $original_price, $discounted_price, $is_variable_product, $initial_price_html, $separator) {
if ($original_price != $discounted_price){
$html = '<ins>' . $discounted_price . '</ins>';
}
return $html;
},10,6);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment