Hi there,
I have created a free shipping discount code with minimum spend (and minimum quantity requirements). When I apply the discount code using the checkoutDiscountApply mutation, the discount is applied even when I am nowhere near the minimum spend required, or under the minimum quantity of items.
Here’s a sample graphql response using a code that has a minimum spend of $50 (I also tried with a minimum quantity of 2 and added 1 item to my cart, same result)
{
"ready":true,
"requiresShipping":true,
"orderStatusUrl":null,
"currencyCode":"AUD",
"lineItemsSubtotalPrice":{
"amount":"12.99",
"currencyCode":"AUD",
"__typename":"MoneyV2"
},
"subtotalPrice":"12.99",
"subtotalPriceV2":{
"amount":"12.99",
"currencyCode":"AUD",
"__typename":"MoneyV2"
},
"totalPrice":"12.99",
"totalPriceV2":{
"amount":"12.99",
"currencyCode":"AUD",
"__typename":"MoneyV2"
},
"completedAt":null,
"createdAt":"2022-06-24T01:50:19Z",
"updatedAt":"2022-06-30T01:08:34Z",
"discountApplications":{
"pageInfo":{
"hasNextPage":false,
"hasPreviousPage":false,
"__typename":"PageInfo"
},
"edges":[
{
"node":{
"targetSelection":"ALL",
"allocationMethod":"EACH",
"targetType":"SHIPPING_LINE",
"value":{
"percentage":100,
"__typename":"PricingPercentageValue"
},
"code":"XXXXXXXXXX",
"applicable":true,
"__typename":"DiscountCodeApplication"
},
"__typename":"DiscountApplicationEdge"
}
]
}
With amount off orders, the minimum spend rules work just fine and the discount code isn’t applicable. Is this a bug, or am I doing something wrong?