Tagged: enfold, related products, woocommerce
Is it possible to NOT show related product?
I only want to show YOU MAY ALSO LIKE prodcts
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
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
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
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?
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
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 …
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
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