I want to hide specific tabs in woocommerce setting. I read this article: https://stackoverflow.com/questions/36779307/hide-a-woocommerce-setting-tab

It worked for shop manager only.

  1. I want to hide it for adminstrator too. I tried to add similar snippet by replacing shop manager with adminstrator, but got error.

  2. In my website there ar multiple administratior. Is it possible to hide it for specific admin user?

1 Answer 1


If you want to hide for specific users, just change the if statement. eg

if( in_array( $user->ID, [LIST_OF_USER_IDS] ) ) {
  • Thank you very much. It is working properly.
    – Deb
    Commented Nov 26, 2021 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.