prevented some errors when the order has no taxes
This commit is contained in:
parent
fda7a5565c
commit
7c141fcd41
|
@ -579,6 +579,12 @@ function wc_create_refund( $args = array() ) {
|
|||
if ( empty( $refund_item['qty'] ) && empty( $refund_item['refund_total'] ) && empty( $refund_item['refund_tax'] ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Prevents errors when the order has no taxes
|
||||
if ( ! isset( $refund_item['refund_tax'] ) ) {
|
||||
$refund_item['refund_tax'] = array();
|
||||
}
|
||||
|
||||
switch ( $order_items[ $refund_item_id ]['type'] ) {
|
||||
case 'line_item' :
|
||||
$args = array(
|
||||
|
|
Loading…
Reference in New Issue