It seems the 'is_omise_payment_resolved' flag is not working smoothly with Offline payment flow.
For those Credit Card and Offsite payment methods, we have is_omise_payment_resolved as an indicator to tell the plugin if a specific Webhook event is needed to be queued (if the store's callback has triggered). However, as Offline has no redirection behaviour after payment, this is_omise_payment_resolved will stay as false forever.
Event handler flow at the moment:
1). if "Order.is_omise_payment_resolved" is "false"?
2). if Queue.try < 3, queue the event again.
3). Otherwise, bypass the "is_omise_payment_resolved" check to execute Charge.Complete event handler class.
The current flow is working just fine, however increases unnecessary steps to force all the Offline payment webhook to be in Queue as is_omise_payment_resolved as in the current, will never be set to true.
Related information:
Related issue(s): T22534 (internal ticket)
2. Description of change
Immediately flags WC Order, is_omise_payment_resolved to yes if place a new order with offline payment method.
3. Quality assurance
🔧 Environments:
WooCommerce: v4.3.1
WordPress: v5.4.2
PHP version: 7.3.3
✏️ Details:
To test this, you may try place a new order using one of the offline payment methods that Omise-WooCommerce supports.
Once the order has been placed, is_omise_payment_resolved flag will be updated to yes.
Which, will result in the charge.complete webhook event will get executed right after the Omise Webhook event is fired without being put in WC Queue.
1. Objective
It seems the 'is_omise_payment_resolved' flag is not working smoothly with Offline payment flow.
For those Credit Card and Offsite payment methods, we have
is_omise_payment_resolved
as an indicator to tell the plugin if a specific Webhook event is needed to be queued (if the store's callback has triggered). However, as Offline has no redirection behaviour after payment, thisis_omise_payment_resolved
will stay asfalse
forever.Event handler flow at the moment: 1). if "Order.is_omise_payment_resolved" is "false"? 2). if Queue.try < 3, queue the event again. 3). Otherwise, bypass the "is_omise_payment_resolved" check to execute Charge.Complete event handler class.
The current flow is working just fine, however increases unnecessary steps to force all the Offline payment webhook to be in Queue as
is_omise_payment_resolved
as in the current, will never be set totrue
.Related information: Related issue(s): T22534 (internal ticket)
2. Description of change
is_omise_payment_resolved
toyes
if place a new order with offline payment method.3. Quality assurance
🔧 Environments:
✏️ Details:
To test this, you may try place a new order using one of the offline payment methods that Omise-WooCommerce supports. Once the order has been placed,
is_omise_payment_resolved
flag will be updated toyes
.Which, will result in the
charge.complete
webhook event will get executed right after the Omise Webhook event is fired without being put in WC Queue.4. Impact of the change
None
5. Priority of change
Normal
6. Additional Notes
None