woocommerce offtopic - Get unsolved array keys of product data tabs in woo product editor page

I can get array keys of product data tabs in woo product editor page by this code var_dump( array_keys( $tabs ) );, so I

I can get array keys of product data tabs in woo product editor page by this code var_dump( array_keys( $tabs ) );, so I can hide them. But I could not solve the array keys of couple tabs that created by plugin and build in tab by the theme (flatsome). Any help really appreciate it. Thank you.

// Remove Product Type Tab Options
add_filter('woocommerce_product_data_tabs' , 'block_wc_product_tabs' );

function block_wc_product_tabs($tabs) {

      if (!current_user_can('yith_vendor')) {  // replace role ID with your own
          return $tabs;
      }

      var_dump( array_keys( $tabs ) );
      //unset($tabs['general']);
      //unset($tabs['inventory']);
      unset($tabs['linked_product']);
      unset( $tabs['tm_extra_product_options'] );
      //unset( $tabs['product_origin'] );

      return $tabs;
    }

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745057425a4608751.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信