• Resolved mariodez

    (@mariodez)


    Hi,
    I added a custom tab visible just for admins and I need to print it too

    add_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)
  • Thread Starter mariodez

    (@mariodez)

    I forgot to tell you that only admins should be able to print that tab,
    thanks in advance!

    • This reply was modified 8 years, 11 months ago by mariodez.
    Thread Starter mariodez

    (@mariodez)

    this support forum is just awful, no one replies

    Plugin Author kenrichman

    (@kenrichman)

    I’m sorry, this can’t be done without custom coding which is outside the scope of the free support offered for this free plugin.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘print custom tab visible for admin’ is closed to new replies.