Skip to content

Commit c44c17b

Browse files
committed
added $item (WC_Order_Item) parameter to hooks inside order items loop
added 'wcdn_order_item_after' action
1 parent 55d86d4 commit c44c17b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
?>
118118
<tr>
119119
<td class="product-name">
120-
<?php do_action( 'wcdn_order_item_before', $product, $order ); ?>
120+
<?php do_action( 'wcdn_order_item_before', $product, $order, $item ); ?>
121121
<span class="name">
122122
<?php
123123

@@ -190,7 +190,7 @@
190190

191191
<?php
192192

193-
$fields = apply_filters( 'wcdn_order_item_fields', array(), $product, $order );
193+
$fields = apply_filters( 'wcdn_order_item_fields', array(), $product, $order, $item );
194194

195195
foreach ( $fields as $field ) :
196196
?>
@@ -201,6 +201,7 @@
201201
<?php endforeach; ?>
202202
</dl>
203203
<?php } ?>
204+
<?php do_action( 'wcdn_order_item_after', $product, $order, $item ); ?>
204205
</td>
205206
<td class="product-item-price">
206207
<span><?php echo wp_kses_post( wcdn_get_formatted_item_price( $order, $item ) ); ?></span>

0 commit comments

Comments
 (0)