0

I am working on wordpress,the plugins are :woocommerce,datafeedr api,and datefeedr product sets,I added some products from datafeedr also in woocommerce,now I want to deactivate the related product temporarily,I don t went to remove them.

ryan
  • 3
  • 2

1 Answers1

0
remove_action(
  'woocommerce_after_single_product_summary',
  'woocommerce_output_related_products',
  20
);

If that didn't work, remove it and use this in functions.php:

add_filter(
  'woocommerce_related_products_args',
  '_remove_related_products',
  10
);

function _remove_related_products( $args ) {
  return array();
}

I hope this one work, if didn't, you change 10 to 20, 30 or ... until it works, I hope.

Mehdi Namvar
  • 1,093
  • 8
  • 8