$user = wp_get_current_user();
if (!current_user_can('activate_plugins')) {
add_action('admin_head', 'removeCategories', 100);
function removeCategories()
{
echo "<style>#product_cat-23{display: none !important;}</style>";
}
}
It’s admin_head for admin UI.
Related Posts:
- WooCommerce which roles and capabilities control user login re-direct to Woo Account Page?
- How to add a menu page for options in wordpress for user that has the role of vendor?
- How to update user role without logout
- In WooCommerce filter the available Payment Methods by User Role [closed]
- Admin access for custom user capabilities
- WP_Query with meta_query for children
- WooCommerce limited role
- WooCommerce Customer Role Delete Custom Post Type
- Tried to create a user role that can only edit user information, but my test account cannot view the dashboard. What am I missing?
- Allow add new post access to custom post but not wp post for some role
- WooCommerce Admin order – Only run action if user is loaded
- WooCommerce get_author_posts_url() – Author URL redirecting to shop base
- I have 3 types of prices in WP and I need to change price for each specific user role using hooks
- Switch to user link shortcode
- How to show specific admin menu to specific user role?
- Assign user role by text field in WordPress (Woocommerce) [closed]
- Need help with woocommerce roles
- How to change user role after login?
- Woocommerce customer role doesn’t change if user is already a subscriber [closed]
- How to add capabilities for editor type user to access admin section
- WooThemes – Vendors / Bookings – Allow Vendors to manage resources
- Changing second user role while updating/downgrading membership level – s2member [closed]
- How to disable the “Upgrade or Downgrade” button in “My account” of WooCommerce Subscriptions
- Restrict the shop_manager role to the WooCommerce Orders Page
- Add another user role based on a defined input field in WordPress (Woocommerce)
- Taxclass based on certain conditions: location+userrole
- Removing unwanted role after purchase
- Membership website with discount on scheduled appointment
- Woocommerce: how to make only certain products shippable?
- Woocommerce | I want to the button ‘Add to Cart’ on the (all) product-page changed by just ‘open product’ button
- Woocommerce API REST search by multiple keywords
- How to disable plugin capability : “create new category”
- How to fetch More Offers products in WooCommerce?
- Adding line breaks in WooCommerce order processing emails
- How do I use a combination of switch_to_blog() and wc_create_order()?
- Customer email notification upon order update in woocommerce
- error 500 in Back Office when using a woocommerce function in functions.php
- How to dublicate WC Product title to shortdescription field? [closed]
- Hide price, “add to cart” button and show message “Please log in to shop” [closed]
- Not showing correct number of product after using sort [closed]
- How can i hide a specific class when cart subtotal is above a certain amount
- Add second price option based on payment method at cart item price
- Update WooCommerce Short Description using SQL
- Problems using WooCommerce & Qstomizer
- Custom e-commerce display for specific users [closed]
- Add Additional 3 buttons next to “Add to cart” button in woocommerce product page
- Remove Ok Button when popup message
- How to get the attributes based on dependency in woocommerce?
- Woocommerce composite and bundle products
- Create WordPress account on different domain when WooCommerce order completed
- Creating a woocommerce order when a user creates an account
- edit slider plugin capability for custom_role
- How might I enable a user to view Draft pages from a different Author, without the ability to edit?
- How do I remove the recurring total from thank you for your order email?
- Send data to external websites when there is an update or create a post
- Titles with thumbnails in media library
- Translate Woocommerce tab
- Variation swatches problem in woodomart theme (title of swatch and box are appearing together) [closed]
- WooCommerce Review ID Block
- acf_form() – “On Update” action [closed]
- Trying to insert a div ID link into Woocommerce shortcode Pagination
- Woocommerce -> gallery images per variation without a plugin? [closed]
- sidebar cart page
- Disable Woocommerce Block Editor
- Auto generating API keys using the Application Authentication Endpoint [closed]
- custom status in Woocommerce with database results
- Why is my WordPress admin not working
- WordPress pointing animated GIF images with wrong file name upon upload (GIFs animation not working)
- Remove login fields from /customer-account page [closed]
- Getting error – preview cannot be loaded when activating WooCommerce plugin [closed]
- Create bookings after subscription renewal
- Set single product image (main image) and archive thumbnail image as different from each other in Woocommerce
- WooCommerce Simple Auction and delayed capture
- Question about WooCommerce Subscription
- Is there a way to conditionally check if i’m on product variation page url like mydomain.com/myproduct?attribute_pa_color=red
- Woocommerce backend sorting product drag drop by menu_order to date
- WooCommerce: Redirect to an item’s product page after item is removed from cart
- Woocommerce template not working on newly added products
- Blurry product card image – rendered is 486×452 vs 300×279 in real image. Smaller versions being autocreated and served using srcset
- Change variants URL
- How to update all products with same SKU prefixes when updating stock with CSV?
- woocommerce change tax rate with checkbox
- Use a woocommerce hook to create a table and populate it with a query
- Woocommerce ajax search can’t work on mobile
- What is the best and cheapest way to generate dashboards about conversions data and store users? [closed]
- How to handle WordPress account for terminated employee
- how to show itemized shipping cost|? [closed]
- WooCommerce Pruduct and Category Grid costumization [closed]
- Woocommerce product and category in url [closed]
- GET woocommerce order request is not showing meta data [closed]
- Export Woocomerce Image Product URL
- Add a custom meta column to a built-in import CSV file
- Sort by price when price is set in multiple keys
- Display product categories + child-categories on a single product page
- Hide/show button for the password field in the Woocommerce My Account page
- Reposition variation stock message
- How do I fix this “Uncaught ReferenceError: woodmartThemeModule is not defined”?
- Add a custom code with custom link after add to cart for every product
- How can I solve WordPress error “Cannot load product_attributes” and “Cannot load product-reviews”?
- how to get the current page endpoint