Skip to content
Menu

Why the second payment attempt fails in silence

On a WordPress store selling subscriptions, customers who came back to try paying again were turned away with a message that explained nothing. No failed order, no error in the logs, and 65,526 stored carts for 261 orders ever placed.

A second attempt, on a store we audited

first attempt: the payment did not go throughcart, kept between visits: Plan Athe customer comes back and chooses Plan B"Only one payment plan can be purchased."← nothing says Plan A is still thereorder: not created · error log: empty

What we found

A WordPress store selling subscriptions was losing customers at the moment they wanted to pay. Someone whose first attempt did not go through came back, chose a plan, and was refused. No failed order was created, and there was nothing in the error logs.

While investigating, one number stood out: the database held 65,526 stored shopping carts, against 261 orders placed in the whole history of the store.

The cause, in three parts

  • WooCommerce keeps the cart of logged-in customers between visits. A plan left there after a failed first attempt was still in the cart days later.
  • The subscription plugin allowed only one plan per purchase. When the customer tried again, the new plan was refused with a generic notice that did not say an older plan was still in the cart. The customer saw an error they could not understand, and left.
  • A paywall plugin automatically added a product to the cart of every visitor. Almost everyone had a cart, which made the first two problems much more likely and filled the database with sessions.

Why no dashboard shows it

No order is created, so the store reports show nothing. The payment gateway never receives the attempt, so it shows nothing either. Analytics records a visit that did not convert, which looks exactly like a customer who changed their mind.

How to check your store

  • Log in as a test customer, add a plan, leave at the payment page, and come back the next day. Try to buy a different plan. Is the cart empty? Does the message tell you what to do?
  • Compare the number of rows in the wp_woocommerce_sessions table with your number of orders. A huge difference means something is creating carts for people who never meant to buy.
  • Check that the WooCommerce session cleanup task is actually scheduled. On this store it was not, and expired sessions piled up.

How we fixed it

  • We stopped the automatic add to cart. Each visit went from setting three cart cookies to setting none.
  • The purchase path now empties the cart before validating a new plan, so an old plan can no longer block a new one.
  • We scheduled the session cleanup and removed 10,040 expired sessions.

The same investigation uncovered a separate problem that the dashboard total was hiding: 165 of 169 subscriptions had produced a single payment and never renewed. That is a story for another article.

Want us to check this on your site?

Get in touch