onAfterOrderConfirm() not triggering

  • Posts: 324
  • Thank you received: 4
  • Hikamarket Multivendor Hikashop Business
3 years 11 months ago #327601

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.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 11 months ago #327603

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.

Please Log in or Create an account to join the conversation.

Time to create page: 0.051 seconds
Powered by Kunena Forum