Update tax rate label when saving order closes #28649

This commit is contained in:
roykho 2021-01-28 14:42:40 -08:00
parent 6701ce9c9d
commit b2eb2d8724
No known key found for this signature in database
GPG Key ID: 7B36C0EA25795714
1 changed files with 1 additions and 0 deletions

View File

@ -1634,6 +1634,7 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
}
$saved_rate_ids[] = $tax->get_rate_id();
$tax->set_tax_total( isset( $cart_taxes[ $tax->get_rate_id() ] ) ? $cart_taxes[ $tax->get_rate_id() ] : 0 );
$tax->set_label( WC_Tax::get_rate_label( $tax->get_rate_id() ) );
$tax->set_shipping_tax_total( ! empty( $shipping_taxes[ $tax->get_rate_id() ] ) ? $shipping_taxes[ $tax->get_rate_id() ] : 0 );
$tax->save();
}