Skip to content

Commit 3759fd3

Browse files
authored
Make order item object key in foreach loop
The key is useful for functions that require $item_id. For instance, $order->get_qty_refunded_for_item($item_id) to get refunded qty for an item.
1 parent 625d4fc commit 3759fd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104

105105
if ( count( $order->get_items() ) > 0 ) :
106106
?>
107-
<?php foreach ( $order->get_items() as $item ) : ?>
107+
<?php foreach ( $order->get_items() as $item_id => $item ) : ?>
108108

109109
<?php
110110

0 commit comments

Comments
 (0)