Hide tabs on woocommerce product editor for user role2019 Community Moderator Electionwoocommerce product category tabsGood Solution for Adding jQuery Tabs Anywhere Within WordPress?WordPress Woocommerce - Product Typewoocommerce how in checkout to add my custom field check box, and when i check it hide the shipping adress and add tax 19%Add Custom CSS to Woocommerce Product Page in a specified categoryReplacing products on Woocommerce Product Category with Search Results from SearchWPDisplaying custom taxonomy on WooCommerce product pageHide Shipping Class Options in Woocommerce Product Data Shipping TabMove WooCommerce product tabs out of the tabsWoocommerce - Default product image by user role
Is this answer explanation correct?
How to install cross-compiler on Ubuntu 18.04?
What is the most common color to indicate the input-field is disabled?
Theorists sure want true answers to this!
Bullying boss launched a smear campaign and made me unemployable
ssTTsSTtRrriinInnnnNNNIiinngg
How to travel to Japan while expressing milk?
Do creatures with a listed speed of "0 ft., fly 30 ft. (hover)" ever touch the ground?
Using "tail" to follow a file without displaying the most recent lines
Is it possible to create a QR code using text?
Getting extremely large arrows with tikzcd
Was the Stack Exchange "Happy April Fools" page fitting with the '90's code?
How can saying a song's name be a copyright violation?
Notepad++ delete until colon for every line with replace all
Mathematica command that allows it to read my intentions
How could indestructible materials be used in power generation?
How do conventional missiles fly?
What Exploit Are These User Agents Trying to Use?
What is a Samsaran Word™?
Why didn't Boeing produce its own regional jet?
Is it inappropriate for a student to attend their mentor's dissertation defense?
In the UK, is it possible to get a referendum by a court decision?
What do you call someone who asks many questions?
How do I exit BASH while loop using modulus operator?
Hide tabs on woocommerce product editor for user role
2019 Community Moderator Electionwoocommerce product category tabsGood Solution for Adding jQuery Tabs Anywhere Within WordPress?WordPress Woocommerce - Product Typewoocommerce how in checkout to add my custom field check box, and when i check it hide the shipping adress and add tax 19%Add Custom CSS to Woocommerce Product Page in a specified categoryReplacing products on Woocommerce Product Category with Search Results from SearchWPDisplaying custom taxonomy on WooCommerce product pageHide Shipping Class Options in Woocommerce Product Data Shipping TabMove WooCommerce product tabs out of the tabsWoocommerce - Default product image by user role
I need help how to hide custom product data tabs (created by plugins) for custom user role on product page editor (see image).
I think it suppose to be done by modifying its CSS and apply it on functions.php
Already try and play with the below code and add the element in it, but not working.
// Remove Product Data Tabs Options on product page editor
add_filter('woocommerce_product_data_tabs' , 'hide_wc_product_tabs' );
function hide_wc_product_tabs($tabs)
if (!current_user_can('yith_vendor')) // replace role ID with your own
return $tabs;
//what code should I implement here
return $tabs;
Any help appreciate. thank you
woocommerce tabs
add a comment |
I need help how to hide custom product data tabs (created by plugins) for custom user role on product page editor (see image).
I think it suppose to be done by modifying its CSS and apply it on functions.php
Already try and play with the below code and add the element in it, but not working.
// Remove Product Data Tabs Options on product page editor
add_filter('woocommerce_product_data_tabs' , 'hide_wc_product_tabs' );
function hide_wc_product_tabs($tabs)
if (!current_user_can('yith_vendor')) // replace role ID with your own
return $tabs;
//what code should I implement here
return $tabs;
Any help appreciate. thank you
woocommerce tabs
Which plugin is used for custom product data tabs? So I can clearly understand and will help you.
– Tanmay Patel
21 hours ago
what @Karun said below solved the problem but not all, the tab created by plugin should be hide is Epeken and the additional extra tab created by the theme.
– jasaweb
20 hours ago
Can you please let me know theme name or give me website URL. So I can check it.
– Tanmay Patel
20 hours ago
Here is the theme link themeforest.net/item/…
– jasaweb
19 hours ago
add a comment |
I need help how to hide custom product data tabs (created by plugins) for custom user role on product page editor (see image).
I think it suppose to be done by modifying its CSS and apply it on functions.php
Already try and play with the below code and add the element in it, but not working.
// Remove Product Data Tabs Options on product page editor
add_filter('woocommerce_product_data_tabs' , 'hide_wc_product_tabs' );
function hide_wc_product_tabs($tabs)
if (!current_user_can('yith_vendor')) // replace role ID with your own
return $tabs;
//what code should I implement here
return $tabs;
Any help appreciate. thank you
woocommerce tabs
I need help how to hide custom product data tabs (created by plugins) for custom user role on product page editor (see image).
I think it suppose to be done by modifying its CSS and apply it on functions.php
Already try and play with the below code and add the element in it, but not working.
// Remove Product Data Tabs Options on product page editor
add_filter('woocommerce_product_data_tabs' , 'hide_wc_product_tabs' );
function hide_wc_product_tabs($tabs)
if (!current_user_can('yith_vendor')) // replace role ID with your own
return $tabs;
//what code should I implement here
return $tabs;
Any help appreciate. thank you
woocommerce tabs
woocommerce tabs
asked 21 hours ago
jasawebjasaweb
85
85
Which plugin is used for custom product data tabs? So I can clearly understand and will help you.
– Tanmay Patel
21 hours ago
what @Karun said below solved the problem but not all, the tab created by plugin should be hide is Epeken and the additional extra tab created by the theme.
– jasaweb
20 hours ago
Can you please let me know theme name or give me website URL. So I can check it.
– Tanmay Patel
20 hours ago
Here is the theme link themeforest.net/item/…
– jasaweb
19 hours ago
add a comment |
Which plugin is used for custom product data tabs? So I can clearly understand and will help you.
– Tanmay Patel
21 hours ago
what @Karun said below solved the problem but not all, the tab created by plugin should be hide is Epeken and the additional extra tab created by the theme.
– jasaweb
20 hours ago
Can you please let me know theme name or give me website URL. So I can check it.
– Tanmay Patel
20 hours ago
Here is the theme link themeforest.net/item/…
– jasaweb
19 hours ago
Which plugin is used for custom product data tabs? So I can clearly understand and will help you.
– Tanmay Patel
21 hours ago
Which plugin is used for custom product data tabs? So I can clearly understand and will help you.
– Tanmay Patel
21 hours ago
what @Karun said below solved the problem but not all, the tab created by plugin should be hide is Epeken and the additional extra tab created by the theme.
– jasaweb
20 hours ago
what @Karun said below solved the problem but not all, the tab created by plugin should be hide is Epeken and the additional extra tab created by the theme.
– jasaweb
20 hours ago
Can you please let me know theme name or give me website URL. So I can check it.
– Tanmay Patel
20 hours ago
Can you please let me know theme name or give me website URL. So I can check it.
– Tanmay Patel
20 hours ago
Here is the theme link themeforest.net/item/…
– jasaweb
19 hours ago
Here is the theme link themeforest.net/item/…
– jasaweb
19 hours ago
add a comment |
2 Answers
2
active
oldest
votes
The $tabs
will return an array. Before the line return $tabs;
you should check the key in the array and unset it. You can use var_dump
to check what the array contains if you're unsure of the key name.
thanks, it works but I only got one key name from the tabs, how to get the other tabs key name?
– jasaweb
21 hours ago
$tabs
should return all the available keys. Try increasing the priority value onadd_filter
and keep on debugging usingvar_dump
– Karun
20 hours ago
still no luck after increasing the priority value. any other method?
– jasaweb
20 hours ago
add a comment |
So using your code as reference, you could do something like:
function hide_wc_product_tabs( $tabs )
if ( ! current_user_can( 'yith_vendor' ) )
return $tabs;
unset( $tabs['inventory'] ); // Removes the inventory tab.
return $tabs;
add_filter( 'woocommerce_product_data_tabs' , 'hide_wc_product_tabs' );
These are the default WooCommerce product tabs:
Array ( [0] => general [1] => inventory [2] => shipping [3] => linked_product [4] => attribute [5] => variations [6] => advanced )
Hope it helps!
I get it, but what I need to hide additional custom tabs created by specific plugins. I think it suppose to be done by modifying its CSS and apply it in the code.
– jasaweb
21 hours ago
@jasaweb You can do what @Karun suggested in his answer, do avar_dump($tabs)
so you can see what is the key for each tab, and then unset what you don't need.
– dboris
21 hours ago
@jasaweb So you can add this line before that unset:var_dump( array_keys( $tabs ) );
It will print the "name" for all the tabs that are available, then you canunset
the ones you want to.
– Tiago Hillebrandt
21 hours ago
ok going to try
– jasaweb
21 hours ago
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "110"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwordpress.stackexchange.com%2fquestions%2f333204%2fhide-tabs-on-woocommerce-product-editor-for-user-role%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
The $tabs
will return an array. Before the line return $tabs;
you should check the key in the array and unset it. You can use var_dump
to check what the array contains if you're unsure of the key name.
thanks, it works but I only got one key name from the tabs, how to get the other tabs key name?
– jasaweb
21 hours ago
$tabs
should return all the available keys. Try increasing the priority value onadd_filter
and keep on debugging usingvar_dump
– Karun
20 hours ago
still no luck after increasing the priority value. any other method?
– jasaweb
20 hours ago
add a comment |
The $tabs
will return an array. Before the line return $tabs;
you should check the key in the array and unset it. You can use var_dump
to check what the array contains if you're unsure of the key name.
thanks, it works but I only got one key name from the tabs, how to get the other tabs key name?
– jasaweb
21 hours ago
$tabs
should return all the available keys. Try increasing the priority value onadd_filter
and keep on debugging usingvar_dump
– Karun
20 hours ago
still no luck after increasing the priority value. any other method?
– jasaweb
20 hours ago
add a comment |
The $tabs
will return an array. Before the line return $tabs;
you should check the key in the array and unset it. You can use var_dump
to check what the array contains if you're unsure of the key name.
The $tabs
will return an array. Before the line return $tabs;
you should check the key in the array and unset it. You can use var_dump
to check what the array contains if you're unsure of the key name.
answered 21 hours ago
KarunKarun
867721
867721
thanks, it works but I only got one key name from the tabs, how to get the other tabs key name?
– jasaweb
21 hours ago
$tabs
should return all the available keys. Try increasing the priority value onadd_filter
and keep on debugging usingvar_dump
– Karun
20 hours ago
still no luck after increasing the priority value. any other method?
– jasaweb
20 hours ago
add a comment |
thanks, it works but I only got one key name from the tabs, how to get the other tabs key name?
– jasaweb
21 hours ago
$tabs
should return all the available keys. Try increasing the priority value onadd_filter
and keep on debugging usingvar_dump
– Karun
20 hours ago
still no luck after increasing the priority value. any other method?
– jasaweb
20 hours ago
thanks, it works but I only got one key name from the tabs, how to get the other tabs key name?
– jasaweb
21 hours ago
thanks, it works but I only got one key name from the tabs, how to get the other tabs key name?
– jasaweb
21 hours ago
$tabs
should return all the available keys. Try increasing the priority value on add_filter
and keep on debugging using var_dump
– Karun
20 hours ago
$tabs
should return all the available keys. Try increasing the priority value on add_filter
and keep on debugging using var_dump
– Karun
20 hours ago
still no luck after increasing the priority value. any other method?
– jasaweb
20 hours ago
still no luck after increasing the priority value. any other method?
– jasaweb
20 hours ago
add a comment |
So using your code as reference, you could do something like:
function hide_wc_product_tabs( $tabs )
if ( ! current_user_can( 'yith_vendor' ) )
return $tabs;
unset( $tabs['inventory'] ); // Removes the inventory tab.
return $tabs;
add_filter( 'woocommerce_product_data_tabs' , 'hide_wc_product_tabs' );
These are the default WooCommerce product tabs:
Array ( [0] => general [1] => inventory [2] => shipping [3] => linked_product [4] => attribute [5] => variations [6] => advanced )
Hope it helps!
I get it, but what I need to hide additional custom tabs created by specific plugins. I think it suppose to be done by modifying its CSS and apply it in the code.
– jasaweb
21 hours ago
@jasaweb You can do what @Karun suggested in his answer, do avar_dump($tabs)
so you can see what is the key for each tab, and then unset what you don't need.
– dboris
21 hours ago
@jasaweb So you can add this line before that unset:var_dump( array_keys( $tabs ) );
It will print the "name" for all the tabs that are available, then you canunset
the ones you want to.
– Tiago Hillebrandt
21 hours ago
ok going to try
– jasaweb
21 hours ago
add a comment |
So using your code as reference, you could do something like:
function hide_wc_product_tabs( $tabs )
if ( ! current_user_can( 'yith_vendor' ) )
return $tabs;
unset( $tabs['inventory'] ); // Removes the inventory tab.
return $tabs;
add_filter( 'woocommerce_product_data_tabs' , 'hide_wc_product_tabs' );
These are the default WooCommerce product tabs:
Array ( [0] => general [1] => inventory [2] => shipping [3] => linked_product [4] => attribute [5] => variations [6] => advanced )
Hope it helps!
I get it, but what I need to hide additional custom tabs created by specific plugins. I think it suppose to be done by modifying its CSS and apply it in the code.
– jasaweb
21 hours ago
@jasaweb You can do what @Karun suggested in his answer, do avar_dump($tabs)
so you can see what is the key for each tab, and then unset what you don't need.
– dboris
21 hours ago
@jasaweb So you can add this line before that unset:var_dump( array_keys( $tabs ) );
It will print the "name" for all the tabs that are available, then you canunset
the ones you want to.
– Tiago Hillebrandt
21 hours ago
ok going to try
– jasaweb
21 hours ago
add a comment |
So using your code as reference, you could do something like:
function hide_wc_product_tabs( $tabs )
if ( ! current_user_can( 'yith_vendor' ) )
return $tabs;
unset( $tabs['inventory'] ); // Removes the inventory tab.
return $tabs;
add_filter( 'woocommerce_product_data_tabs' , 'hide_wc_product_tabs' );
These are the default WooCommerce product tabs:
Array ( [0] => general [1] => inventory [2] => shipping [3] => linked_product [4] => attribute [5] => variations [6] => advanced )
Hope it helps!
So using your code as reference, you could do something like:
function hide_wc_product_tabs( $tabs )
if ( ! current_user_can( 'yith_vendor' ) )
return $tabs;
unset( $tabs['inventory'] ); // Removes the inventory tab.
return $tabs;
add_filter( 'woocommerce_product_data_tabs' , 'hide_wc_product_tabs' );
These are the default WooCommerce product tabs:
Array ( [0] => general [1] => inventory [2] => shipping [3] => linked_product [4] => attribute [5] => variations [6] => advanced )
Hope it helps!
answered 21 hours ago
Tiago HillebrandtTiago Hillebrandt
943
943
I get it, but what I need to hide additional custom tabs created by specific plugins. I think it suppose to be done by modifying its CSS and apply it in the code.
– jasaweb
21 hours ago
@jasaweb You can do what @Karun suggested in his answer, do avar_dump($tabs)
so you can see what is the key for each tab, and then unset what you don't need.
– dboris
21 hours ago
@jasaweb So you can add this line before that unset:var_dump( array_keys( $tabs ) );
It will print the "name" for all the tabs that are available, then you canunset
the ones you want to.
– Tiago Hillebrandt
21 hours ago
ok going to try
– jasaweb
21 hours ago
add a comment |
I get it, but what I need to hide additional custom tabs created by specific plugins. I think it suppose to be done by modifying its CSS and apply it in the code.
– jasaweb
21 hours ago
@jasaweb You can do what @Karun suggested in his answer, do avar_dump($tabs)
so you can see what is the key for each tab, and then unset what you don't need.
– dboris
21 hours ago
@jasaweb So you can add this line before that unset:var_dump( array_keys( $tabs ) );
It will print the "name" for all the tabs that are available, then you canunset
the ones you want to.
– Tiago Hillebrandt
21 hours ago
ok going to try
– jasaweb
21 hours ago
I get it, but what I need to hide additional custom tabs created by specific plugins. I think it suppose to be done by modifying its CSS and apply it in the code.
– jasaweb
21 hours ago
I get it, but what I need to hide additional custom tabs created by specific plugins. I think it suppose to be done by modifying its CSS and apply it in the code.
– jasaweb
21 hours ago
@jasaweb You can do what @Karun suggested in his answer, do a
var_dump($tabs)
so you can see what is the key for each tab, and then unset what you don't need.– dboris
21 hours ago
@jasaweb You can do what @Karun suggested in his answer, do a
var_dump($tabs)
so you can see what is the key for each tab, and then unset what you don't need.– dboris
21 hours ago
@jasaweb So you can add this line before that unset:
var_dump( array_keys( $tabs ) );
It will print the "name" for all the tabs that are available, then you can unset
the ones you want to.– Tiago Hillebrandt
21 hours ago
@jasaweb So you can add this line before that unset:
var_dump( array_keys( $tabs ) );
It will print the "name" for all the tabs that are available, then you can unset
the ones you want to.– Tiago Hillebrandt
21 hours ago
ok going to try
– jasaweb
21 hours ago
ok going to try
– jasaweb
21 hours ago
add a comment |
Thanks for contributing an answer to WordPress Development Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwordpress.stackexchange.com%2fquestions%2f333204%2fhide-tabs-on-woocommerce-product-editor-for-user-role%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Which plugin is used for custom product data tabs? So I can clearly understand and will help you.
– Tanmay Patel
21 hours ago
what @Karun said below solved the problem but not all, the tab created by plugin should be hide is Epeken and the additional extra tab created by the theme.
– jasaweb
20 hours ago
Can you please let me know theme name or give me website URL. So I can check it.
– Tanmay Patel
20 hours ago
Here is the theme link themeforest.net/item/…
– jasaweb
19 hours ago