[Skip to main content](#vessel-content)

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

##

- **[joom\_dev](/forum/user/52662-joom-dev "View joom&#95;dev's Profile")**
- [![joom&#95;dev's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/52662-joom-dev "View joom&#95;dev's Profile") Topic Author
- [ Offline](/forum/user/52662-joom-dev)

Less More

- Posts: 7
- Thank you received: 1
-
-

6 years 1 month ago [\#324252](#324252) by [joom\_dev](/forum/user/52662-joom-dev "View joom&#95;dev's Profile")  *[Plugin events "onAfterOrderUpdate" and "onAfterOrderCreate" not working.](/forum/25-install-update/900855-plugin-events-onafterorderupdate-and-onafterordercreate-not-working#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&#95;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")* was created by *[joom\_dev](/forum/user/52662-joom-dev "View joom&#95;dev's Profile")*

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](https://gist.github.com/chetanmadaan/7389c716c1edd3280c7228a25be1fa9a)
XML: [ gist.github.com/chetanmadaan/d02ec03537f5f139dd364a71f58fdbc1](https://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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwMDg1NS1wbHVnaW4tZXZlbnRzLW9uYWZ0ZXJvcmRlcnVwZGF0ZS1hbmQtb25hZnRlcm9yZGVyY3JlYXRlLW5vdC13b3JraW5nP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86576
- Thank you received: 14320
-
-

6 years 1 month ago [\#324254](#324254) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Plugin events "onAfterOrderUpdate" and "onAfterOrderCreate" not working.](/forum/25-install-update/900855-plugin-events-onafterorderupdate-and-onafterordercreate-not-working#324254 "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&#95;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")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwMDg1NS1wbHVnaW4tZXZlbnRzLW9uYWZ0ZXJvcmRlcnVwZGF0ZS1hbmQtb25hZnRlcm9yZGVyY3JlYXRlLW5vdC13b3JraW5nP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[joom\_dev](/forum/user/52662-joom-dev "View joom&#95;dev's Profile")**
- [![joom&#95;dev's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/52662-joom-dev "View joom&#95;dev's Profile") Topic Author
- [ Offline](/forum/user/52662-joom-dev)

Less More

- Posts: 7
- Thank you received: 1
-
-

6 years 1 month ago [\#324260](#324260) by [joom\_dev](/forum/user/52662-joom-dev "View joom&#95;dev's Profile")  Replied by *[joom\_dev](/forum/user/52662-joom-dev "View joom&#95;dev's Profile")* on topic *[Plugin events "onAfterOrderUpdate" and "onAfterOrderCreate" not working.](/forum/25-install-update/900855-plugin-events-onafterorderupdate-and-onafterordercreate-not-working#324260 "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&#95;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")*

That did it. Thank You!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwMDg1NS1wbHVnaW4tZXZlbnRzLW9uYWZ0ZXJvcmRlcnVwZGF0ZS1hbmQtb25hZnRlcm9yZGVyY3JlYXRlLW5vdC13b3JraW5nP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.042 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
