News:

Looking for documentation? Take a look on our wiki

Main Menu

Notify vendor order change

Started by Kuubs, September 26, 2022, 12:27:49 PM

Previous topic - Next topic

Kuubs

Hello,

I made a plugin that automatically changes order status for speciifc order that reaches a specific status. But now when the order status gets changed via the plugin the vendor doesnt get a notification via email.  Does anyone know how to do that programmatically?

THis is a snippet of y plugin code:


   function plgVmOnUpdateOrderPayment ($data,$old_order_status) {
$app = JFactory::getApplication();
if (!$app->isAdmin()){
#return true;
}


Or am I using the wrong fucntion to override?

EDIT: OK i checked a bit and it seems that this plugin catches the confirmed email before it's actually set on order status confirmed. Which means that the confirmed status is not actually set (which means no vendor email and no shopper email that hte order is confirmed)

Does anyone know how to make sure that the plugin does it's work AFTER the confirmed status triggers are exectued?