Update: problem solved!
Normally, this snippet should be sufficient to stop ‘related products’ from showing on the Single product page:
remove_action( ‘woocommerce_after_single_product_summary’, ‘woocommerce_output_related_products’, 20);
Unfortunately, this snippet has absolutely no effect.
I searched around and saw that many before me were running into this issue. Finally via Stack Overflow (https://stackoverflow.com/questions/42215193/remove-action-on-related-products-is-not-working-with-woocommerce-hook) I found a snippet that does work, provided theme 2021 is used.
function remove_woo_relate_products(){
remove_action( ‘woocommerce_after_single_product_summary’, ‘woocommerce_output_related_products’, 20);
remove_action( ‘woocommerce_after_single_product_summary’, ‘woocommerce_upsell_display’, 15 );
remove_action( ‘woocommerce_after_single_product_summary’, ‘storefront_upsell_display’, 15 );
}
add_action(‘init’, ‘remove_woo_relate_products’, 10);
If I then switch to Enfold I see the related products on the product page again.
I know I can use CSS to make the related products ‘not visible’, but I don’t want them to load at all to keep the page as light as possible.
How can I achieve this?
https://www.dropbox.com/s/g642jfalv3rvzpv/Schermafbeelding%202022-05-06%20om%2015.41.23.png?dl=0
Thanks in advance!
Ita
Found this topic what solved my problem!
https://kriesi.at/support/topic/remove-woocommerce-related-products-from-shop-page/
Have a nice weekend!