0

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

0

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

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

Your Answer

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

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