Plugin events "onAfterOrderUpdate" and "onAfterOrderCreate" not working.

  • Posts: 7
  • Thank you received: 1
4 years 1 month ago #324252

Hi,

I am trying to create a plugin where the order information will be sent to a 3rd party api after every successful order.

I know I can't use the OnAfterOderConfirm since that's only available for primary payment and shipping method plugins.

So, I wanted to use onAfterOrderUpdate function to catch all orders on update and it's not working as expected. I created a plugin for group hikashop, installed and enabled it and no avail.
PHP gist.github.com/chetanmadaan/7389c716c1edd3280c7228a25be1fa9a
XML: gist.github.com/chetanmadaan/d02ec03537f5f139dd364a71f58fdbc1

The file that triggers this plugin:
/administrator/components/com_hikashop/classes/order.php:474 does seem to have the correct trigger and if I print the $order there, it shows the array.

Can you see if I am doing anything wrong here?

Thank you,
Chetan

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
4 years 1 month ago #324254

Hi,

The class of your plugin is incorrect and thus your plugin is ignored by Joomla.
Since your plugin is of the group "hikashop" and not "hikashoppayment", the class should be plgHikashopXxx and not plgHikashoppaymentXxx

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

  • Posts: 7
  • Thank you received: 1
4 years 1 month ago #324260

That did it. Thank You!

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

Time to create page: 0.059 seconds
Powered by Kunena Forum