
WooCommerce empties the cart only when the customer reaches the “order received” page. But many payments happen somewhere else: on the bank’s page, in a banking app (Bizum), or in a wallet (Apple Pay, Google Pay). If the customer pays and never comes back to your shop, their cart stays full. The next time they visit, they see the same products again and may think the payment failed, or buy them twice. With the Cart and Checkout blocks, WooCommerce does not empty it on the next visit either.
Even when the customer does come back, other requests fired by that same page (for example, admin-ajax calls from other plugins) can read the old cart and save it again after it was emptied.
Comercia Studio Paid Cart Cleaner fixes both cases:
There are no settings. Activate it and it works.
This plugin was built and tested on our own WooCommerce stores in Spain and Portugal, where customers pay with Bizum, Apple Pay, Google Pay, cards and PayPal.
This plugin is developed by Comercia Studio. It is not affiliated with, endorsed by or sponsored by WooCommerce or Automattic. WooCommerce is a registered trademark of Automattic Inc.
paidcc_keep_coupons (array $codes, WC_Order $order): coupon codes that must stay in the cart, for example a loyalty points coupon managed by another plugin.paidcc_remove_cart_item (bool $remove, array $cart_item, array $paid): whether a cart line is removed. Return true for lines another plugin adds by itself (a free gift, for example) so they are recalculated.