Merge pull request #5934 from barrykooij/bugfix/fix-order-metabox-notices
Fix notices, added isset() checks around $legacy_order
This commit is contained in:
commit
e7e9de4cbd
|
@ -198,7 +198,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ( ! $legacy_order && 'yes' == get_option( 'woocommerce_calc_taxes' ) ) :
|
if ( isset( $legacy_order ) && ! $legacy_order && 'yes' == get_option( 'woocommerce_calc_taxes' ) ) :
|
||||||
$line_tax_data = isset( $item['line_tax_data'] ) ? $item['line_tax_data'] : '';
|
$line_tax_data = isset( $item['line_tax_data'] ) ? $item['line_tax_data'] : '';
|
||||||
$tax_data = maybe_unserialize( $line_tax_data );
|
$tax_data = maybe_unserialize( $line_tax_data );
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ if ( 'yes' == get_option( 'woocommerce_calc_taxes' ) ) {
|
||||||
<th class="line_cost"><?php _e( 'Total', 'woocommerce' ); ?></th>
|
<th class="line_cost"><?php _e( 'Total', 'woocommerce' ); ?></th>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ( ! $legacy_order && 'yes' == get_option( 'woocommerce_calc_taxes' ) ) :
|
if ( isset( $legacy_order ) && ! $legacy_order && 'yes' == get_option( 'woocommerce_calc_taxes' ) ) :
|
||||||
foreach ( $order_taxes as $tax_id => $tax_item ) :
|
foreach ( $order_taxes as $tax_id => $tax_item ) :
|
||||||
$tax_class = wc_get_tax_class_by_tax_id( $tax_item['rate_id'] );
|
$tax_class = wc_get_tax_class_by_tax_id( $tax_item['rate_id'] );
|
||||||
$tax_class_name = isset( $classes_options[ $tax_class ] ) ? $classes_options[ $tax_class ] : __( 'Tax', 'woocommerce' );
|
$tax_class_name = isset( $classes_options[ $tax_class ] ) ? $classes_options[ $tax_class ] : __( 'Tax', 'woocommerce' );
|
||||||
|
|
|
@ -67,7 +67,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ( ! $legacy_order && 'yes' == get_option( 'woocommerce_calc_taxes' ) ) :
|
if ( isset( $legacy_order ) && ! $legacy_order && 'yes' == get_option( 'woocommerce_calc_taxes' ) ) :
|
||||||
$shipping_taxes = isset( $item['taxes'] ) ? $item['taxes'] : '';
|
$shipping_taxes = isset( $item['taxes'] ) ? $item['taxes'] : '';
|
||||||
$tax_data = maybe_unserialize( $shipping_taxes );
|
$tax_data = maybe_unserialize( $shipping_taxes );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue