Comments Janus started the conversation2 days ago on Wednesday 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,549Dustin replied2 days ago on Wednesday 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 replied2 days ago on Wednesday 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? 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?