I'm having a problem with WordPress/Woocommerce creating a second order for customers. This is leading to a couple issues that I'll outline below. Here is the process I am following:
- Create and populate new Woocommerce Subscription object
- Create new renewal order (this will be ID 1033 below) and send invoice to customer
- Customer logs in and finds the pending order in My Account page
- Customer opens the pending order and it is populated with the correct products and price. Customer pays the correct amount
- After payment, customer is on the receipt screen but it is for a new order. The old order is still sitting on their account as pending.
After looking at the access log, I can see this:
- Here is the entry link (pre-payment): /checkout/order-pay/1033
- And here is the review link (post-payment): /checkout/order-received/1055
The problems I am encountering are:
- I have tested completing payments more than dozen times and was only able to replicate it the first time. I have followed those same steps as much as possible to no avail (all other transactions are processing as expected without creating extra orders)
- The initial order is connected to a subscription, and upon completed payment the subscription is set to automatic payments. This issue of having a new order is detaching it, and automatic payments cannot be enabled until after the next payment is processed (a month later), and will rely on the customer manually submitting the order again.
Does anyone have any idea why WordPress/Woocommerce is creating a second order upon payment.