print custom tab visible for admin
-
Hi,
I added a custom tab visible just for admins and I need to print it tooadd_filter( 'woocommerce_product_tabs', 'woo_new_product_tab' ); // function woo_new_product_tab( $tabs ) { // // Adds the new tab // if (current_user_can('administrator')): // $tabs['test_tab'] = array( // 'title' => __( 'New Product Tab', 'woocommerce' ), // 'priority' => 50, // 'callback' => 'woo_new_product_tab_content' // ); // endif; // //var_dump(current_user_can('administrator')); // return $tabs; // } // function woo_new_product_tab_content() { // // The new tab content // echo '<h2>New Product Tab</h2>'; // echo '<p>Here\'s your new product tab.</p>'; // }how can I do that?
thanks
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘print custom tab visible for admin’ is closed to new replies.