Skip to content

Commit 74304f6

Browse files
authored
Revert "issue-150"
1 parent b6b1f6c commit 74304f6

File tree

1 file changed

+4
-53
lines changed

1 file changed

+4
-53
lines changed

woocommerce-delivery-notes/templates/print-order/print-content.php

Lines changed: 4 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -228,62 +228,13 @@
228228
<?php do_action( 'wcdn_order_item_after', $product, $order, $item ); ?>
229229
</td>
230230
<td class="product-item-price">
231-
<span>
232-
<?php
233-
$product_meta_datas = $item->get_meta_data();
234-
$price_individually = '';
235-
$no_price = false;
236-
if ( is_array( $product_meta_datas ) ) {
237-
foreach ( $product_meta_datas as $product_meta_data ) {
238-
if ( isset( $product_meta_data->key ) ) {
239-
if ( '_bundled_items' === $product_meta_data->key || '_composite_children' === $product_meta_data->key ) {
240-
$no_price = true;
241-
}
242-
if ( '_bundled_item_priced_individually' === $product_meta_data->key || '_component_priced_individually' === $product_meta_data->key ) {
243-
$price_individually = $product_meta_data->value;
244-
}
245-
}
246-
}
247-
}
248-
if ( 'no' === $price_individually ) {
249-
echo '';
250-
} elseif ( true === $no_price ) {
251-
echo wp_kses_post( $order->get_formatted_line_subtotal( $item ) );
252-
} else {
253-
echo wp_kses_post( wcdn_get_formatted_item_price( $order, $item ) );
254-
}
255-
?>
256-
</span>
231+
<span><?php echo wp_kses_post( wcdn_get_formatted_item_price( $order, $item ) ); ?></span>
257232
</td>
258233
<td class="product-quantity">
259-
<span>
260-
<?php
261-
$product_meta_datas = $item->get_meta_data();
262-
if ( is_array( $product_meta_datas ) ) {
263-
foreach ( $product_meta_datas as $product_meta_data ) {
264-
if ( isset( $product_meta_data->key ) ) {
265-
if ( '_composite_children' === $product_meta_data->key || '_bundled_items' === $product_meta_data->key ) {
266-
$item['qty'] = 0;
267-
} else {
268-
continue;
269-
}
270-
}
271-
}
272-
}
273-
if ( 0 === $item['qty'] ) {
274-
echo '';
275-
} else {
276-
echo esc_attr( apply_filters( 'wcdn_order_item_quantity', $item['qty'], $item ) );
277-
}
278-
?>
279-
</span>
234+
<span><?php echo esc_attr( apply_filters( 'wcdn_order_item_quantity', $item['qty'], $item ) ); ?></span>
280235
</td>
281236
<td class="product-price">
282-
<span>
283-
<?php
284-
echo wp_kses_post( $order->get_formatted_line_subtotal( $item ) );
285-
?>
286-
</span>
237+
<span><?php echo wp_kses_post( $order->get_formatted_line_subtotal( $item ) ); ?></span>
287238
</td>
288239
</tr>
289240
<?php endforeach; ?>
@@ -302,7 +253,7 @@
302253
<td class="total-item-price"></td>
303254
<?php if ( 'Total' === $total['label'] ) { ?>
304255
<td class="total-quantity"><?php echo wp_kses_post( $order->get_item_count() ); ?></td>
305-
<?php } else { ?>
256+
<?php } else { ?>
306257
<td class="total-quantity"></td>
307258
<?php } ?>
308259
<td class="total-price"><span><?php echo wp_kses_post( $total['value'] ); ?></span></td>

0 commit comments

Comments
 (0)