File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
woocommerce-delivery-notes/templates/print-order Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 139139 </span>
140140
141141 <?php
142+ $ item_meta_fields = apply_filters ( 'wcdn_product_meta_data ' , $ item ['item_meta ' ], $ item );
142143
143144 $ product_addons = array ();
144145 $ woocommerce_product_addon = 'woocommerce-product-addons/woocommerce-product-addons.php ' ;
149150 if ( version_compare ( get_option ( 'woocommerce_version ' ), '3.0.0 ' , '>= ' ) ) {
150151 if ( isset ( $ item ['variation_id ' ] ) && 0 !== $ item ['variation_id ' ] ) {
151152 $ variation = wc_get_product ( $ item ['product_id ' ] );
152- foreach ( $ item [ ' item_meta ' ] as $ key => $ value ) {
153+ foreach ( $ item_meta_fields as $ key => $ value ) {
153154 if ( ! ( 0 === strpos ( $ key , '_ ' ) ) ) {
154155 if ( is_array ( $ value ) ) {
155156 continue ;
173174 }
174175 }
175176 } else {
176- foreach ( $ item [ ' item_meta ' ] as $ key => $ value ) {
177+ foreach ( $ item_meta_fields as $ key => $ value ) {
177178 if ( ! ( 0 === strpos ( $ key , '_ ' ) ) ) {
178179 if ( is_array ( $ value ) ) {
179180 continue ;
192193 }
193194 }
194195 } else {
195- $ item_meta_new = new WC_Order_Item_Meta ( $ item [ ' item_meta ' ] , $ product );
196+ $ item_meta_new = new WC_Order_Item_Meta ( $ item_meta_fields , $ product );
196197 $ item_meta_new ->display ();
197198
198199 }
You can’t perform that action at this time.
0 commit comments