Author Topic: Notify vendor order change  (Read 411 times)

Kuubs

  • Jr. Member
  • **
  • Posts: 376
Notify vendor order change
« on: September 26, 2022, 12:27:49 pm »
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:


   
Code: [Select]
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?