Please submit a private ticket if you need to share sensitive information, such as license details and admin credentials.

Okay
  Public Ticket #3572748
Hiding sub products - doesn't change stock
Open

Comments

  • Janus started the conversation

    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 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?

  •  767
    Janilyn replied

    Hi Janus,

    Thank you for contacting WPClever Support Forum. 

    We’ve received your ticket and assigned one of our developers to help you with that. 

    He’ll be looking into your question and responding with specific instructions as soon as possible. 

    Please stay patient as we're having very heavy workloads, it might take some time for our developers to reach back.

    Best regards.

    Janilyn T. - WPClever Support Agent

  •  1,224
    Dustin replied

    Hi Janus,

    What is the plugin you're using to generate invoices?

    Please turn off this snippet and try a new option in our plugin https://app.screencast.com/q56LKz0DbCBbL. Hope it will work for invoices.

    If it doesn't work, please purchase a new license then I'll check and fix it for you. Your licenses are expired.

    Best regards,
    Dustin

  •   Janus replied privately
  • Janus replied

    I just wanted to follow up on this - have you been able to find a solution?

  • Janus replied

    Dustin, have you had a chance to look into this? You wrote, that if we purchased a license you could help fix this, and then since that no answer?