[2.2] During refunds, correctly set shipping tax totals

Fixes #6691
This commit is contained in:
Mike Jolley 2014-11-14 12:52:40 +00:00
parent 5cb26c7ae4
commit 2e2ce3c286
2 changed files with 3 additions and 5 deletions

View File

@ -667,10 +667,8 @@ abstract class WC_Abstract_Order {
$line_tax_data = maybe_unserialize( $item['taxes'] );
if ( isset( $line_tax_data['total'] ) ) {
foreach ( $line_tax_data['total'] as $tax_rate_id => $tax ) {
if ( isset( $line_tax_data ) ) {
foreach ( $line_tax_data as $tax_rate_id => $tax ) {
if ( ! isset( $order_shipping_taxes[ $tax_rate_id ] ) ) {
$order_shipping_taxes[ $tax_rate_id ] = 0;
}

View File

@ -13,7 +13,7 @@ $who_refunded = new WP_User( $refund->post->post_author );
<td class="name">
<?php
echo esc_attr__( 'Refund', 'woocommerce' ) . ' - ' . esc_attr( date_i18n( get_option( 'date_format' ) . ', ' . get_option( 'time_format' ), strtotime( $refund->post->post_date ) ) );
echo esc_attr__( 'Refund', 'woocommerce' ) . ' #' . absint( $refund->id ) . ' - ' . esc_attr( date_i18n( get_option( 'date_format' ) . ', ' . get_option( 'time_format' ), strtotime( $refund->post->post_date ) ) );
if ( $who_refunded->exists() ) {
echo ' ' . esc_attr_x( 'by', 'Ex: Refund - $date >by< $username', 'woocommerce' ) . ' ' . '<abbr class="refund_by" title="' . esc_attr__( 'ID: ', 'woocommerce' ) . absint( $who_refunded->ID ) . '">' . esc_attr( $who_refunded->display_name ) . '</abbr>' ;