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

Okay
  Public Ticket #3743064
Hook to retrieve products of bundle
Open

Comments

  •  1
    elenio mattera started the conversation

    hi there,

    i want to display the products of a bundle on my product page. 

    With

    WPCleverWoosb()->show_bundled();

    I can get a list of all items, but I would like to retrieve an array so I am more flexible with the shown content.

    did not find a function for that. 


    thanks in advance.

    elenio

  •  1,226
    Dustin replied

    Hi Elenio,

    Please try this one:

    global $product;
    
    if ( $product && is_a( $product, 'WC_Product' ) && $product->is_type( 'woosb' ) && ( $items = $product->get_items() ) ) {
    	var_dump( $items );
    }

    Best regards,
    Dustin

  •  1
    elenio mattera replied

    hi Dustin, that is awesome! thanks a lot

  •  1,226
    Dustin replied

    You're welcome!

    If you are satisfied with our plugin and support, please reward it with a full five-star ★★★★★ rating.
    https://wordpress.org/support/plugin/woo-product-bundle/reviews?rate=5#new-post
    Thank you in advance! ♥

    Best regards,
    Dustin