Skip to content

Commit 4de2942

Browse files
authored
Merge pull request #104 from doozy/master
Allow 3rd party code to add order item data on the print-content.php template
2 parents 587b5a6 + c44c17b commit 4de2942

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)