Hi,
I was trying to change the purchase orders Purchase Order Total/Total Tax/Subtotal via below action hook but seems there is no effect or hook is not firing. below code has been written in function.php
Any idea which action hook should i use to change the Purchase Order Total/Total Tax/Subtotal ?
Note: hardcoded values are just for test.
function before_atum_api_save_oorder($object, $request, $creating){
$object->set_discount_total( 10 );//set_discount_total( $subtotal - $total );
$object->set_discount_tax( 1.4 );//set_discount_tax( $subtotal_tax - $total_tax );
$object->set_total( 11.4 );//set_total( $grand_total );
$object->save();
}
add_action( 'atum/order/before_api_save_oorder', 'before_atum_api_save_oorder', 10, 3 );