phppluginsjoomlavirtuemart

Get virtuemart order status after chage


My problem is, that second parameter in plgVmOnUpdateOrderPayment event is actually old status code before change.

Did anybody knows, how to get new status letter after changing order status via e.g. paypal plugin or in administration?


Solution

  • Aleš Pázner, yes the second parameter is always the old order status.

    But you can use this piece of code:

    function plgVmOnUpdateOrderPayment($virtuemart_order,$old_status) {
       // getting the new status 
       // $virtuemart_order->order_status
       return;
    }
    

    Source: Plugin event methods in Virtuemart for order status