Skip to content

Commit 138ddef

Browse files
authored
Merge pull request #126 from TycheSoftwares/issue_125
Hide the child products in Composite Products through filter
2 parents 28b93b3 + 7f96c4c commit 138ddef

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,11 @@
107107
<?php foreach ( $order->get_items() as $item ) : ?>
108108

109109
<?php
110-
$product = apply_filters( 'wcdn_order_item_product', $item->get_product(), $item );
111110

111+
$product = apply_filters( 'wcdn_order_item_product', $item->get_product(), $item );
112+
if ( ! $product ) {
113+
continue;
114+
}
112115
if ( version_compare( get_option( 'woocommerce_version' ), '3.0.0', '>=' ) ) {
113116
$item_meta = new WC_Order_Item_Product( $item['item_meta'], $product );
114117
} else {

0 commit comments

Comments
 (0)