0

I want to remove all unnecessary tabs from the WooCommerce product page in the backend. I've already found an article ( How to remove woocommerce tab?), which describes, how to remove the description, review or additional information tab in the backend. (e.g. unset( $tabs['reviews'] );).

enter image description here

The last two tabs are from the WooCommerce Subscription plugin and our CRM. If I use var_dump($tabs), the two tabs aren't shown in the array and can't be removed the same way. How can I find the name of the tabs and how can I remove them?

Jonas
  • 111
  • 2
  • 13
  • deactivate WooCommerce Subscription plugin and check – Vel Nov 18 '22 at 04:00
  • I am guessing the WC Subscription plugin and/or your CRM plugin utilizes the `woocommerce_product_tabs` filter with higher priority (it us executed later) than your filter callback - therefore at the time of your callback being executed, those custom tabs are not set yet. Try calling that filter with a higher priority (e.g. 9999). – Kristián Filo Nov 18 '22 at 07:10

1 Answers1

2

You're looking at the wrong code and article for your need.

woocommerce_product_tabs filter hook is for frontend single product page tabs not for backend.

for the background product data tabs, you need to use woocommerce_product_data_tabs filter hook.

Vijay Hardaha
  • 2,411
  • 1
  • 7
  • 16