Merge pull request woocommerce/woocommerce-admin#1665 from woocommerce/fix/not-a-number

fix warning in some versions of PHP
This commit is contained in:
Claudio Sanches 2019-02-21 19:44:37 -03:00 committed by GitHub
commit c94406e0d7
1 changed files with 1 additions and 1 deletions

View File

@ -161,7 +161,7 @@ class WC_Admin_Order extends WC_Order {
if ( $tax_data ) {
foreach ( $order_taxes as $tax_item ) {
$tax_item_id = $tax_item->get_rate_id();
$tax_item_total = isset( $tax_data['total'][ $tax_item_id ] ) ? $tax_data['total'][ $tax_item_id ] : '';
$tax_item_total = isset( $tax_data['total'][ $tax_item_id ] ) ? $tax_data['total'][ $tax_item_id ] : 0;
$refunded = $this->get_tax_refunded_for_item( $item_id, $tax_item_id, 'shipping' );
if ( $refunded ) {
$total_shipping_tax_amount += $tax_item_total - $refunded;