-
-
Save woogists/283ebce1fa16a98113c40bbbc10a96ae to your computer and use it in GitHub Desktop.
Still not working for me, I am using Woocommerce 3.8.0 and Avada 6.1.1... anyone had the same problem?
I developed a plugin based on this filter:
https://wordpress.org/plugins/remove-woocommerce-product-related/
If you can test, thank you;)
Thanks!
Still not working for me, I am using Woocommerce 3.8.0 and Avada 6.1.1... anyone had the same problem?
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 );
}
add_action('init', 'remove_woo_relate_products', 10);
None of these examples works. Why do I need a plugin for every basic thing in wordpress so annoying
For those that had probems with this working, you need to wait until woocommerce is loaded before you can remove this action as this action has yet to be added until a point later in the process
add_action('woocommerce_loaded', function () { remove_action('woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20); }, PHP_INT_MAX);
I developed a plugin based on this filter:
https://wordpress.org/plugins/remove-woocommerce-product-related/
If you can test, thank you;)
Thanks!
does work dude!!
The code that worked for me was:
add_filter('woocommerce_product_related_posts_query', '__return_empty_array', 100);