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
|
@@ 1028-1038 (lines=11) @@
|
| 1025 |
|
) ); |
| 1026 |
|
|
| 1027 |
|
// BW compatibility with old args |
| 1028 |
|
if ( isset( $args['totals'] ) ) { |
| 1029 |
|
foreach ( $args['totals'] as $key => $value ) { |
| 1030 |
|
if ( 'tax' === $key ) { |
| 1031 |
|
$args['total_tax'] = $value; |
| 1032 |
|
} elseif ( 'tax_data' === $key ) { |
| 1033 |
|
$args['taxes'] = $value; |
| 1034 |
|
} else { |
| 1035 |
|
$args[ $key ] = $value; |
| 1036 |
|
} |
| 1037 |
|
} |
| 1038 |
|
} |
| 1039 |
|
|
| 1040 |
|
$item = new WC_Order_Item_Product( $args ); |
| 1041 |
|
|