Support » Plugin: Woocommerce Frequently Bought Together » Not showing up – shortcodes?

  • lucaspanjaard

    (@lucaspanjaard)


    Dear Madam/Sir,

    I’m trying out your plug-in. Product bundles don’t show up on the product page. I’m using the WP Astra theme. Any ideas?

    I see someone asked about shortcodes 8 months ago. How’s that coming along?

    Best,

    Luca

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Premmerce

    (@premmerce)

    Hello, @lucaspanjaard!

    Please, make screenshot of main page of Woocommerce Frequently Bought Together in WP dashboard.
    Also, you can try those shortcodes:

    [premmerce_get_bundle_by_id id="2"]
    [premmerce_get_bundles_by_main_product_id id="28"]
    lucaspanjaard

    (@lucaspanjaard)

    Hi,

    Sure, see screenshot here: https://pasteboard.co/HWS8lFk.png. As you can see I’ve set one test bundle for 1 product.

    Thank you for the shortcodes. I’m using Elementor and use a single-product template for all products. If I use the [premmerce_get_bundles_by_main_product_id id=”X”] code where X equals the product id of the product in the screenshot, the test bundle is indeed displayed nicely.

    How should I go about with the shortcode if I don’t want to set X? I will have multiple, unique bundles for my products, so I can’t simply set [premmerce_get_bundle_by_id id=”X”].

    Thanks in advance for your help.

    With kind regards,

    Luca

    Plugin Author Premmerce

    (@premmerce)

    Our bundles are displaying via hook:
    woocommerce_after_single_product_summary
    If on product page there no bundles – your theme don’t use this hook or doing “remove all action” for this hook.

    So you need to call hook woocommerce_after_single_product_summary on all product pages. Also you can do this by yourself:
    make child theme and add this code to function.php

    add_shortcode('woocommerce_after_single_product_summary', function (){
        ob_start();
    
       do_action('woocommerce_after_single_product_summary');
    
       return ob_get_clean();
    })

    after this – add this shortcode to your single-product template [woocommerce_after_single_product_summary]

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.