Vimeo for WooCommerce

Adder by PM

Pinterest for WooCommerce

Added by Team Desire

WisePad 3 banner

Points Redemption Option for Sale Items

I would love a way to automatically remove points redemption on checkout for any items that are on sale.

Current Status

Open

Last updated: April 17, 2018

1 comment

Log in to comment on this feature request.

  1. baltoxyz says:

    Absolutely this should be an option, it’s amazing how this idea is three years old now.
    Customers should not be able to apply points to products that are already on sale

    EDIT: Include this on your functions.php file to use original price instead of sale price when redeeming points:

    //do not apply fixed price coupon when product is on sale
    add_action( ‘woocommerce_before_calculate_totals’, ‘adjust_cart_coupon’, 10, 1);
    function adjust_cart_coupon( $cart_object) {
    global $woocommerce;

    if ( is_admin() && ! defined( ‘DOING_AJAX’ ) ){
    return;
    }

    $coupon = False;

    if ($coupons = WC()->cart->get_applied_coupons() == False ) {
    $coupon = False;
    } else {
    foreach ( WC()->cart->get_applied_coupons() as $code ) {
    $coupons1 = new WC_Coupon( $code );
    if ($coupons1->type == ‘fixed_cart’){
    $coupon = True;
    }
    }
    }

    if ($coupon == True){
    foreach ( $cart_object->get_cart() as $cart_item ){
    $price = $cart_item[‘data’]->regular_price;
    //sets cart item to use regular price and not sale price
    $cart_item[‘data’]->set_price( $price );
    }
    }
    }

WooCommerce

The most customizable eCommerce platform for building your online business.

  • 30 day money back guarantee
  • Support teams across the world
  • Safe & Secure online payment