diff --git a/includes/admin/post-types/meta-boxes/class-wc-meta-box-order-totals.php b/includes/admin/post-types/meta-boxes/class-wc-meta-box-order-totals.php index 227af72bd7c..f11f891d879 100644 --- a/includes/admin/post-types/meta-boxes/class-wc-meta-box-order-totals.php +++ b/includes/admin/post-types/meta-boxes/class-wc-meta-box-order-totals.php @@ -269,8 +269,8 @@ class WC_Meta_Box_Order_Totals { } // Update totals - update_post_meta( $post_id, '_order_tax', wc_round_tax_total( $total_tax ) ); - update_post_meta( $post_id, '_order_shipping_tax', wc_round_tax_total( $total_shipping_tax ) ); + update_post_meta( $post_id, '_order_tax', wc_format_decimal( $total_tax ) ); + update_post_meta( $post_id, '_order_shipping_tax', wc_format_decimal( $total_shipping_tax ) ); update_post_meta( $post_id, '_order_discount', wc_format_decimal( $_POST['_order_discount'] ) ); update_post_meta( $post_id, '_order_total', wc_format_decimal( $_POST['_order_total'] ) ); diff --git a/includes/class-wc-checkout.php b/includes/class-wc-checkout.php index 69f722812b3..7af9760e59e 100644 --- a/includes/class-wc-checkout.php +++ b/includes/class-wc-checkout.php @@ -373,8 +373,8 @@ class WC_Checkout { update_post_meta( $order_id, '_order_shipping', wc_format_decimal( WC()->cart->shipping_total ) ); update_post_meta( $order_id, '_order_discount', wc_format_decimal( WC()->cart->get_order_discount_total() ) ); update_post_meta( $order_id, '_cart_discount', wc_format_decimal( WC()->cart->get_cart_discount_total() ) ); - update_post_meta( $order_id, '_order_tax', wc_format_decimal( wc_round_tax_total( WC()->cart->tax_total ) ) ); - update_post_meta( $order_id, '_order_shipping_tax', wc_format_decimal( wc_round_tax_total( WC()->cart->shipping_tax_total ) ) ); + update_post_meta( $order_id, '_order_tax', wc_format_decimal( WC()->cart->tax_total ) ); + update_post_meta( $order_id, '_order_shipping_tax', wc_format_decimal( WC()->cart->shipping_tax_total ) ); update_post_meta( $order_id, '_order_total', wc_format_decimal( WC()->cart->total, get_option( 'woocommerce_price_num_decimals' ) ) ); update_post_meta( $order_id, '_order_key', 'wc_' . apply_filters('woocommerce_generate_order_key', uniqid('order_') ) ); diff --git a/includes/gateways/paypal/class-wc-gateway-paypal.php b/includes/gateways/paypal/class-wc-gateway-paypal.php index 95a6502e1c7..99d5ba5f6f2 100644 --- a/includes/gateways/paypal/class-wc-gateway-paypal.php +++ b/includes/gateways/paypal/class-wc-gateway-paypal.php @@ -357,7 +357,7 @@ class WC_Gateway_Paypal extends WC_Payment_Gateway { if ( ( $order->get_total_shipping() + $order->get_shipping_tax() ) > 0 ) { $paypal_args['item_name_2'] = __( 'Shipping via', 'woocommerce' ) . ' ' . ucwords( $order->get_shipping_method() ); $paypal_args['quantity_2'] = '1'; - $paypal_args['amount_2'] = number_format( $order->get_total_shipping() + $order->get_shipping_tax() , 2, '.', '' ); + $paypal_args['amount_2'] = number_format( $order->get_total_shipping() + $order->get_shipping_tax(), 2, '.', '' ); } } else {