Add action to hook onto for order recalculation
This commit is contained in:
parent
15e77b30a1
commit
af9441fea5
|
@ -1437,6 +1437,9 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
|
|||
$this->set_discount_total( $cart_subtotal - $cart_total );
|
||||
$this->set_discount_tax( $cart_subtotal_tax - $cart_total_tax );
|
||||
$this->set_total( round( $cart_total + $fee_total + $this->get_shipping_total() + $this->get_cart_tax() + $this->get_shipping_tax(), wc_get_price_decimals() ) );
|
||||
|
||||
do_action( 'woocommerce_order_before_calculate_totals_order_save', $and_taxes, $this );
|
||||
|
||||
$this->save();
|
||||
|
||||
return $this->get_total();
|
||||
|
|
Loading…
Reference in New Issue