Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #776267

    Is it possible to NOT show related product?
    I only want to show YOU MAY ALSO LIKE prodcts

    #777250

    Hey studioinktvis,

    Please add following code to Functions.php file in Appearance > Editor

    function avia_remove_related_products( $args ) {
    	return array();
    }
    add_filter('woocommerce_related_products_args','avia_remove_related_products', 10); 

    Best regards,
    Yigit

    #783077

    Hey Yigit,

    is there a fix for woocommerce version 3.x ? The code you provided doesn’t seem to work with the latest version of woocommerce.

    thanks

    #783103

    Hi,

    Please add following code to Functions.php file in Appearance > Editor instead

    remove_action( 'woocommerce_after_single_product_summary', 'avia_woocommerce_output_related_products', 20);

    Best regards,
    Yigit

    #787716

    Hi, I have the same problem.
    I tried inserting the last code, but I still see the related products. Is there another way to hide the section?

    #787817

    Hi,


    @makelab
    The last code i posted works totally fine on my local installation. Can you please start a new thread and attach temporary admin logins in private content field so we can look into it?
    If you post them here, they will be visible to creator of this thread as well :)

    Best regards,
    Yigit

    #787885

    Hi Yigit,

    makelab is right. It doesn’t work for me either. I am on the latest woo version and the latest version of the theme.

    for now i have removed all the code from the related.php file …

    #787911

    Hi @Shorty05,

    Please also start a new thread and attach temporary admin logins in the private content field so we can take a closer look.

    Thank you!
    Sarah

    #788157

    Hi,

    Please try using the code as following if you are using a child theme

    function avia_remove_related_product() { 
    remove_action( 'woocommerce_after_single_product_summary', 'avia_woocommerce_output_related_products', 20);
    } 
    add_action( 'init', 'avia_remove_related_product');

    Best regards,
    Yigit

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