Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/284.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 删除WooCommerce产品数据中添加的限制选项卡_Php_Wordpress_Woocommerce_Hook Woocommerce - Fatal编程技术网

Php 删除WooCommerce产品数据中添加的限制选项卡

Php 删除WooCommerce产品数据中添加的限制选项卡,php,wordpress,woocommerce,hook-woocommerce,Php,Wordpress,Woocommerce,Hook Woocommerce,我正在使用WooCommerce和WooCommerce目录可见性选项插件 我想删除产品数据框中的一些选项卡,例如“常规”、“库存”、“装运”和“限制”选项卡。除限制外,我已使用以下方法删除了前三个选项卡: add_filter('woocommerce_product_data_tabs','woo_remove_product_tabs',10,1); 功能woo_删除产品_选项卡($tabs){ 未设置($tabs['general']); 未结算($tabs['inventory');

我正在使用WooCommerce和WooCommerce目录可见性选项插件

我想删除产品数据框中的一些选项卡,例如“常规”、“库存”、“装运”和“限制”选项卡。除限制外,我已使用以下方法删除了前三个选项卡:

add_filter('woocommerce_product_data_tabs','woo_remove_product_tabs',10,1);
功能woo_删除产品_选项卡($tabs){
未设置($tabs['general']);
未结算($tabs['inventory');
未结算($tabs['shipping']);
未设置($tabs['restrictions']);
返回$tabs;
}
通过研究,我知道限制选项卡是由WooCommerce目录可见性选项插件添加的。我深入研究了源代码,找到了添加限制的方法

public function\uuuu construct(){
add_action('woocommerce_product_write_panel_tabs',数组($this,'add_tab'));
}
公共函数添加选项卡(){
?>