Woocommerce Cart Does not empty after checkout - woocommerce

for some reason, sometimes (very randomly) the customer cart does not empty after successful checkout.. after this if the customer logs out and then logs in, the cart is empty as it should..
any helP?

Related

Woocommerce Cart Items not showing

When I add products to the cart they do not appear, only the total price and final purchase appear, configuration is ok.
Someone said to me that the problem is related to dynamic change on the cart page
Cart page error

How to add a subscription product to woocommerce orders after purchase

so I am trying to add an additional product to a customers cart just before he checks out. In the real sense, I am trying to make sure that all my customers are subscribed to the woocommerce membership as soon as they hit the proceed button on the checkout. I have tried creating a subscription product and tied t a membership and attached the the subscription product to the cart via coupon but this does not work.
Anyone has any ideas? Please help.
I have tried creating a subscription product and tied t a membership and attached the the subscription product to the cart via coupon but this does not work.
Anyone has any ideas? Please help.

how to prevent same product adding multiple times to cart when I want my visitor to directly go to checkout

Let say someone decides to buy my product and click on the buy now option and reached my checkout page. But for some reason he/she didn't buy it.
But after sometime he/she made his mind to purchase the product but when they click on buy know button the product price get doubles because the product is added a second time in the cart.
As i am not giving access to the cart page to my visitor so they can't modify there cart.
Is there anyway with which I can prevent the same product adding a second time in cart.
I don't want the min maximum plugin because it doesn't prevent from adding same product multiple time. It just shows a notification that the max amount is 1.
I just don't want the same product to be addded twice in the cart no matter what.
I tried this code:
add_filter( 'woocommerce_add_cart_item_data', 'woo_custom_add_to_cart' );
function woo_custom_add_to_cart( $cart_item_data ) {
global $woocommerce;
$woocommerce->cart->empty_cart();
// Do nothing with the data and return
return $cart_item_data;
}
But after adding it I am not able to add a second product into my cart.
As I have added a order bump in my checkout page but when i tried to add it it replaced the main product.
You can force a single purchase of a given product from Edit Product > Product Data > Inventory > Sold Individually
No code needed

"Checkout is not available while your cart is empty" problem

I was doing the woo-commerce website and doing testing. I add the product to the cart and proceed to checkout. I was then select to pay with blizpay and it directs me to the blizpay payment page. I was then manually clicked back to return to the woo-commerce website to cancel the payment and it shows Checkout is not available whilst your cart is empty. My previous added product was gone. Can anyone help?
You previous add products are not in cart. It goes to order log and payment status of those products are pending.

How to set up a persistent shopping cart in woocommerce for Multiple Devices and Browsers?

How can we setup persistent shopping cart in woocommerce for different devices.
Like if we login and add some products in cart and update cart then products in cart store in database and when I login from other device it fetches same data.
Right now it fetches data bases on user session. When we try to add products in cart in different browser it shows different products in cart in both browsers for same user.

Resources