wp-graphql-woocommerce icon indicating copy to clipboard operation
wp-graphql-woocommerce copied to clipboard

Cart not getting empty after checkout

Open akshaykatale99 opened this issue 4 years ago • 2 comments

Describe the bug Cart not getting empty after checkout mutation

Using this mutation with the custom payment method.

checkoutMutation({
                variables: {
                    input: {
                        billing: checkoutData.customer.billing,
                        isPaid: true,
                        clientMutationId: "testcartcheckout",
                        paymentMethod: "razorpay",
                        transactionId: data.razorpay_payment_id
                    }
                }
            })

Expected behavior After checkout cart should be empty.

Tested on latest version of this plugin

akshaykatale99 avatar May 10 '21 13:05 akshaykatale99

You can use the emptyCart mutation on a successful checkout.

davevanhoorn avatar May 19 '21 11:05 davevanhoorn

@davevanhoorn Yes, now I am using emptyCart mutation as a workaround.

akshaykatale99 avatar May 19 '21 11:05 akshaykatale99