- Posts: 324
- Thank you received: 4
onAfterOrderConfirm() not triggering
5 years 9 months ago #327601
by DogPeople
onAfterOrderConfirm() not triggering was created by DogPeople
Hi there,
I have a developer creating a plugin for me, but apparently onAfterOrderConfirm() is not triggering when he tests out the plugin.
I need the plugin to trigger after payment is made, because it's supposed to only move a product from one category to the next when the product is paid for.
What could be causing this problem, and / or what should I ask him?
Thanks.
I have a developer creating a plugin for me, but apparently onAfterOrderConfirm() is not triggering when he tests out the plugin.
I need the plugin to trigger after payment is made, because it's supposed to only move a product from one category to the next when the product is paid for.
What could be causing this problem, and / or what should I ask him?
Thanks.
Please Log in or Create an account to join the conversation.
5 years 9 months ago #327603
by nicolas
Replied by nicolas on topic onAfterOrderConfirm() not triggering
Hi,
The onAfterOrderConfirm function is only called for the payment plugin selected for the order.
It's not a real trigger.
And that's not the trigger you want to use anyways.
The one you want to use is onAfterOrderUpdate where you'll have to check the status in $order->order_status and $order->old->order_status so that you can run your code when the status is being changed to what you want.
The onAfterOrderConfirm function is only called for the payment plugin selected for the order.
It's not a real trigger.
And that's not the trigger you want to use anyways.
The one you want to use is onAfterOrderUpdate where you'll have to check the status in $order->order_status and $order->old->order_status so that you can run your code when the status is being changed to what you want.
Please Log in or Create an account to join the conversation.
Time to create page: 0.133 seconds