Merge pull request #15152 from woocommerce/fix/15127

Handle shipping item taxes if set to avoid the legacy fallback
This commit is contained in:
Claudiu Lodromanean 2017-05-18 08:28:02 -07:00 committed by GitHub
commit 0132a29c18
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ class WC_Order_Item_Shipping extends WC_Order_Item {
$tax_data = array(
'total' => array(),
);
if ( ! empty( $raw_tax_data['total'] ) ) {
if ( isset( $raw_tax_data['total'] ) ) {
$tax_data['total'] = array_map( 'wc_format_decimal', $raw_tax_data['total'] );
} elseif ( ! empty( $raw_tax_data ) && is_array( $raw_tax_data ) ) {
// Older versions just used an array.