Home Forums Mighty Frequently Bought Together for WooCommerce Hide Recommended products

Tagged: 

Mighty Frequently Bought Together for WooCommerce

  • #25423
  • |
  • 4 months, 3 weeks ago

Hide Recommended products

lewiscornwell
Participant

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?

  • #25464
  • |
  • 4 months, 3 weeks ago
Akash
Keymaster

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

  • #25468
  • |
  • 4 months, 3 weeks ago
lewiscornwell
Participant

Hello,

Thank you. Almost! However, I need to return an array of the ‘Frequently purchased together’ product IDs for a product.

Many thanks
Lewis

  • #25470
  • |
  • 4 months, 3 weeks ago
lewiscornwell
Participant

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.

  • #25483
  • |
  • 4 months, 3 weeks ago
Akash
Keymaster

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

  • #26233
  • |
  • 3 months, 3 weeks ago
Akash
Keymaster

Closing the issue due to inactivity.

You can always create a new post if something else comes up.

Thanks.

  • img-3

    Take Elementor to the Next Level
    Get Mighty Addons today!

    Explore More

  • Viewing 6 posts - 1 through 6 (of 6 total)
    • The topic ‘Hide Recommended products’ is closed to new replies.
    img-bottom-cta

    Get Products Updates & Promos Directly in your inbox!