You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the past we've worked on a number of changes that are designed to prevent a bug where a customer pays for a failed renewal order and the resulting order is a new-unlinked order. The expected behaviour is that it the existing renewal order should be reused, no new order should be created.
There are still reports of stores being impacted by this.
We need to find a way to resolve that. We don't currently know what the cause is, and we haven't been able to replicate it. I see this issue needing to be broken down into two parts:
This must not be working in some (perhaps rare) circumstances.
We need to observe/log if these functions are working as expected. We can probably do that by hooking onto woocommerce_checkout_create_order() and checking if the cart contains a renewal order and if the order's cart hash matches the cart.
Tip
Maybe it's someone hooking onto woocommerce_create_order and creating an order themselves - bypassing WooCommerce checking if the order can be resumed. 🤷♂
FIX 🛠
Based on what we observe from the logging adding above, find a fix.
Product impact
Does this issue affect WooCommerce Subscriptions? yes/no/tbc, add issue ref
Does this issue affect WooCommerce Payments? yes/no/tbc, add issue ref
Additional context
The text was updated successfully, but these errors were encountered:
Describe the bug
In the past we've worked on a number of changes that are designed to prevent a bug where a customer pays for a failed renewal order and the resulting order is a new-unlinked order. The expected behaviour is that it the existing renewal order should be reused, no new order should be created.
There are still reports of stores being impacted by this.
We need to find a way to resolve that. We don't currently know what the cause is, and we haven't been able to replicate it. I see this issue needing to be broken down into two parts:
OBSERVE 👀
When you pay for a failed renewal order, we attempt to force WooCommerce to reuse the existing order.
We do this by making sure the order's cart hash is updated. see
update_cart_hash()
andset_renewal_order_cart_hash_on_block_checkout()
.This must not be working in some (perhaps rare) circumstances.
We need to observe/log if these functions are working as expected. We can probably do that by hooking onto
woocommerce_checkout_create_order()
and checking if the cart contains a renewal order and if the order's cart hash matches the cart.Tip
Maybe it's someone hooking onto
woocommerce_create_order
and creating an order themselves - bypassing WooCommerce checking if the order can be resumed. 🤷♂FIX 🛠
Based on what we observe from the logging adding above, find a fix.
Product impact
Additional context
The text was updated successfully, but these errors were encountered: