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

admin2025-04-19  0

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;
    }
转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1745057426a282484.html

最新回复(0)