includes/abstracts/abstract-wc-legacy-order.php 1 location
|
@@ 42-52 (lines=11) @@
|
| 39 |
|
} |
| 40 |
|
|
| 41 |
|
// BW compatibility with old args |
| 42 |
|
if ( isset( $args['totals'] ) ) { |
| 43 |
|
foreach ( $args['totals'] as $key => $value ) { |
| 44 |
|
if ( 'tax' === $key ) { |
| 45 |
|
$args['total_tax'] = $value; |
| 46 |
|
} elseif ( 'tax_data' === $key ) { |
| 47 |
|
$args['taxes'] = $value; |
| 48 |
|
} else { |
| 49 |
|
$args[ $key ] = $value; |
| 50 |
|
} |
| 51 |
|
} |
| 52 |
|
} |
| 53 |
|
|
| 54 |
|
// Handly qty if set |
| 55 |
|
if ( isset( $args['qty'] ) ) { |
includes/abstracts/abstract-wc-order.php 1 location
|
@@ 1043-1053 (lines=11) @@
|
| 1040 |
|
) ); |
| 1041 |
|
|
| 1042 |
|
// BW compatibility with old args |
| 1043 |
|
if ( isset( $args['totals'] ) ) { |
| 1044 |
|
foreach ( $args['totals'] as $key => $value ) { |
| 1045 |
|
if ( 'tax' === $key ) { |
| 1046 |
|
$args['total_tax'] = $value; |
| 1047 |
|
} elseif ( 'tax_data' === $key ) { |
| 1048 |
|
$args['taxes'] = $value; |
| 1049 |
|
} else { |
| 1050 |
|
$args[ $key ] = $value; |
| 1051 |
|
} |
| 1052 |
|
} |
| 1053 |
|
} |
| 1054 |
|
|
| 1055 |
|
$item = new WC_Order_Item_Product( $args ); |
| 1056 |
|
$item->set_backorder_meta(); |