Comments Janus started the conversationOctober 22, 2025 at 5:46amHi I have read other posts referring to this snippet add_filter( 'woocommerce_order_get_items', function ( $items ) { foreach ( $items as $key => $item ) { if ( $item->meta_exists( '_woosb_parent_id' ) ) { unset( $items[ $key ] ); } } return $items; }, 10, 1 ); I am using this to hide sub products on our admin orders, invoicing system etc. But we are experiencing issues with that stock for the sub products are not changing when this code is active. How can we make it work so sub products are still hidden, but that the stock function still works? 1,565Dustin repliedOctober 22, 2025 at 8:30amHi Janus, The admin orders are for accounting and statistics purposes, so you should not hide the child products. For the invoicing system, you can check the options in the Compatible tab. If you use another plugin, let me know. In that case, please renew your license, as the old one, purchased on February 16, 2024, has expired for support.Best regards,DustinJanus repliedOctober 22, 2025 at 8:47amWe are using an external warehouse system called Shipmondo.dk which fetches the order data through the rest api with this plugin: https://wordpress.org/plugins/pakkelabels-for-woocommerce/ So is it possible to exclude the sub products in the rest api? 1,565Dustin replied3 weeks ago on October 27, 2025 at 8:07amIf that plugin only gets the product information that needs to be shipped, you can try this option in each bundle: Let me know if it works as expected.Best regards,Dustin Janus replied privately 1,565Dustin replied3 weeks ago on October 31, 2025 at 10:01amYou can try contacting the author of the Shipmondo plugin (https://wordpress.org/plugins/pakkelabels-for-woocommerce/) to ask about this issue. They know their plugin well and will easily have a solution. Our plugin added additional metadata to identify which child products are bundled. On cart items, check $cart_item['woosb_parent_id'] and remove that item. On order items, check $order_item->get_meta( '_woosb_parent_id' ) and remove that item.Best regards,Dustin Sign in to reply ...
Hi I have read other posts referring to this snippet
add_filter( 'woocommerce_order_get_items', function ( $items ) { foreach ( $items as $key => $item ) { if ( $item->meta_exists( '_woosb_parent_id' ) ) { unset( $items[ $key ] ); } } return $items; }, 10, 1 );I am using this to hide sub products on our admin orders, invoicing system etc.
But we are experiencing issues with that stock for the sub products are not changing when this code is active.
How can we make it work so sub products are still hidden, but that the stock function still works?
Hi Janus,
The admin orders are for accounting and statistics purposes, so you should not hide the child products.
For the invoicing system, you can check the options in the Compatible tab. If you use another plugin, let me know.
In that case, please renew your license, as the old one, purchased on February 16, 2024, has expired for support.
Best regards,
Dustin
We are using an external warehouse system called Shipmondo.dk which fetches the order data through the rest api with this plugin: https://wordpress.org/plugins/pakkelabels-for-woocommerce/
So is it possible to exclude the sub products in the rest api?
If that plugin only gets the product information that needs to be shipped, you can try this option in each bundle:
Let me know if it works as expected.
Best regards,
Dustin
You can try contacting the author of the Shipmondo plugin (https://wordpress.org/plugins/pakkelabels-for-woocommerce/) to ask about this issue. They know their plugin well and will easily have a solution.
Our plugin added additional metadata to identify which child products are bundled.
On cart items, check $cart_item['woosb_parent_id'] and remove that item.
On order items, check $order_item->get_meta( '_woosb_parent_id' ) and remove that item.
Best regards,
Dustin