The third argument to add_menu_page()
is $capability
.
add_menu_page(
$page_title,
$menu_title,
$capability,
$menu_slug,
$function,
$icon_url,
$position
);
That governs who can see the page. You’ve registered yours as “administrator”, which is a user role. Presumably your vendors are not of that role. To fix this, you will need to change that argument to a capability (preferably not a role) that your vendors have. You can create custom capabilities for this, which is probably what I’d do.
Related Posts:
- WooCommerce which roles and capabilities control user login re-direct to Woo Account Page?
- Can I remove WooCommerce specific product categories from shop managers?
- How to update user role without logout
- In WooCommerce filter the available Payment Methods by User Role [closed]
- How to change menu page capability
- add_menu_page() for more than one user role
- 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
- Temporary capability for current_user_can()
- How to check user role without using current_user_can()
- Optimizing Woocommerce order items query
- How to restrict specific post types from being read or added by specific user roles (eg. author)?
- New Roles and Capabilities in WordPress
- WooCommerce Template overriding not working with woocommerce.php
- How do you add a custom function to add / update product?
- Limit access to page depending on user level
- how to assign more permission to wordpress author
- Is there a Woocommerce hook that fires when applying a coupon but before checking if it’s valid?
- How to search Woo Commerce products with punctuation in title?
- How to unhook a function in Woocommerce Template?
- create_users capabilities on a role on multisite
- Show only sidebar if widgets have content on the current page
- Disable Woocommerce product tags display by alphabetical order
- Hide Price on one specific Woocommerce Single Product page [closed]
- Change WooCommerce PayPal Built-in Default Order Status
- Woocommerce and Pricing deals plugin total price update with AJAX
- Send a value to woocommerce with a button type submit
- Breadcrumbs on Product Page Always Show Wrong Product [closed]
- Modify SKU for display on product page
- Permalinks contain unwanted space resulting in broken links
- Set different custom menu items for different user roles
- WooCommerce product archive url without value / all values
- Woo commerce+ Stripe – How to associate one account per currency [closed]
- Sort & Display WooCommerce Product Attributes by Order
- WordPress/Woocommerce only show category in shop to a single role
- Adding product info for printing to custom Woocommerce Product Display tab [closed]
- Where are $current_user->allcaps set?
- Add shipping address to Woocommerce order emails [closed]
- A function to add arguments to a taxonomy
- What Capability is required to let a role RUN code in Edit Theme?
- add sub subpage endpoint to woocommerce plugin my-account section
- Can I Create a Second Admin Level User Role?
- how to change the “return to shop” button text? [closed]
- The Capability to choose post/page template
- Problem while adding the variable product woocommerce
- Creating a folder structure
- How do I create a filter to hide the One Click Accessibility plugin button in WordPress?
- customers are not showing up in woocommerce
- Woocomerce Edit source code of form in wordpress
- Woocommerce : How to automatically input the same email for every order?
- Woocommerce – Change order of products in Confirmed Order
- echo product parent category
- How to edit wc_get_template_part for archive products
- How to only display all posts to a custom User Role?
- Display WooCommerce product attribute on shop page
- How to get product category ID based on post?
- Jump to Footer On Scroll – Woocommerce Pages Phones Only
- WordPress Development Workflow
- Woocommerce redirection product_name -> product_cat/product_name
- Unable to call woocommerce hook in my custom php file
- Custom account page that accepts a query parameter
- Custom WooCommerce template for product
- Checkout fr Woocommerce – load default WooCommerce checkout template on the fly
- Loop Through Current Woocommerce Product Categories Sub Categories
- Two types of product categories on shop page
- Remove username and account password field from checkout page
- How to send an invoice with details to the customers
- HTTP Error when uploading pictures and problem with the size of images
- add_rewrite_rule() returns 404 page
- How to change “add to basket” button text in WooCommerce based on product category?
- Woocommerce Setup not completing
- Why user profile update creates Additional Capabilities
- WooCommerce: Bulk Quantity in Cart
- WooCommerce set specific currency on site shop
- WooCommerce shop, my account, cart every page redirect to home page [closed]
- How to edit woocommerce checkout fields
- Include customer details in woocommerce 3rd part plugin email
- how to add a page to a plugin?
- Unable to get product category
- I need help with CPT for a food delivery business
- Woocommerce admin order email customize – remove product short description
- Which php files, in a WordPress setup, do not need direct web access?