I only have an option to move the recommended products, how can I hide it?
I am wanting to integrate within the theme files. Ideally, I would just like an array of product IDs and i can do the rest. Is this possible?
Hi @lewiscornwell,
To remove the related products section, you can use the code below in your functions.php file.
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );
And to get the product IDs, you can use WP_query. Have a look here for the same.
I hope this is what you wanted.
Let me know if you have any other questions.
Thanks,
Akash
Hello,
Thank you. Almost! However, I need to return an array of the ‘Frequently purchased together’ product IDs for a product.
Many thanks
Lewis
Also, I cannot use
remove_action( ‘woocommerce_after_single_product_summary’, ‘woocommerce_output_related_products’, 20 );
because I would like to keep both related products and ‘Frequently bought’ products but display them at different areas on the page.
Hey Lewis,
Please correct me if I am wrong, if you want to show the FBT’s product elsewhere you can use the shortcode to display it anywhere else. The shortcode functionality comes in the Pro version of FBT.
Let me know if you have any other questions.
Thanks,
Akash
Closing the issue due to inactivity.
You can always create a new post if something else comes up.
Thanks.