Support » Plugin: WPC Custom Related Products for WooCommerce » Doesn’t show if upsells are same as related products

  • AnjanPhukan



    If I select the exact same products in upsell and related products then the “Related Products” section doesn’t show up in the single product page. But if I remove at least one of the upsell products, then the Related Products shows.

    Is this a bug? Can I show the “Related Products” section even if the upsell products are same as related products?


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


    Hi @anjanphukan,

    Thanks for contact us and share your concerns.

    We are not sure if it is bug or default behaviour. We will check it and get back to you soon.


    you can do below change for this

    file name is woo-custom-related-products/public/class-woo-custom-related-products-public.php

    //$query[‘where’] .= ” AND p.ID IN ( {$related} )”;
    $query[‘where’] = “WHERE 1=1 AND p.post_status = ‘publish’ AND p.post_type = ‘product’ AND exclude_join.object_id IS NULL AND p.ID IN ( {$related} )”;

    Hi @rajpercept

    Thank you. But I would prefer to wait for the updated version from the plugin developers, if possible. Because changing plugin files will not be good decision for me. But I really appreciate your help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Doesn’t show if upsells are same as related products’ is closed to new replies.