logo

Regular Price in Woocommerce

22 Apr 2020

Apply coupon to Regular Price in Woocommerce

Published On: Wed, 04/22/2020 - 22:13

When we apply coupon for discount its applied for sale price by default but we need to apply discount coupon on regular price so you can use this code on function.php By default cart and product show sale price after applying this code Regular price will be update on cart.

add_action( 'woocommerce_before_calculate_totals', 'add_custom_price', 10, 1);
function add_custom_price( $cart_object) {

    global $woocommerce;

    if ( is_admin()…