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"]
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
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]