When redeeming a gift card, apply to Subtotal (before Shipping, Tax, Fees, etc) instead of Total

By default, the gift card works like cash and applies to the Total (after taxes, shipping, fees, etc). The customer can use it to pay for the Total.

If you want the gift card to work like a Coupon (apply before taxes, shipping, fees, etc) then this needs to apply to the Subtotal instead.

Follow these steps to apply the gift card to the Subtotal before shipping and tax instead of the Total:

1. Download the free Code Snippets plugin: https://wordpress.org/plugins/code-snippets/
2. Create a new snippet with the following code:

function custom_pwgc_eligible_cart_amount( $eligible_amount, $cart ) {
    $eligible_amount = $cart->get_subtotal();

    return $eligible_amount;
}
add_filter( 'pwgc_eligible_cart_amount', 'custom_pwgc_eligible_cart_amount', 10, 2 );
Skip to content