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
- 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
- Disable Woocommerce checkout based on user role [closed]
- WooCommerce – How to add a custom field to only a specific email template [closed]
- WooCommerce PHP – If Product Category Has Children [duplicate]
- Storefront Child Theme show product attribute [closed]
- Why does have_comments return false but get_comments return array of commemts?
- How to add my theme’s style to woocommerce blocks?
- How to disable schema from Wocommerce? [closed]
- Update WooCommerce product price periodically
- CSS url rules not relative to css path in account endpoint areas. IE. subscriptions
- WooCommerce: I Need to hide my page title/header (including menu) from all the WooCommerce related product pages, such as category and keyword pages
- How to add another ordercomments field to woocommerce checkout
- How to remove slug from Product category URL in Woocommerce
- Manage Roles and Capabilities on Multi-site
- Removing ‘woocommerce-no-js’ class from body
- Get a customer’s phone number by woocommerce
- Updating order meta to have a meta entry from an item in the order
- Edit woocommerce subscription email
- Insert a custom field as a second email address to a completed order in WooCommerce
- Select Child Attributes Based on Parent [closed]
- Want to add Number of Products added by each shop manager in users list
- url rewrite doesn’t load woocommerce product
- Assigning an orders Custom Field to User Data
- cannot create product attribute (taxonomy) and add terms on the same execution
- How to display gravity form data to woocommerce my account orders table?
- exclude products none sale in Woocommerce
- registration_errors not working
- How to Manage Multiple WordPress Websites from one dashboard (WooCommerce)
- current_user_can() returning true for capability when the user and role do not have the capability
- Woocommerce – display all sold out products
- dakon show vender address on checkout page
- Adding total_sales to Grouped Product within WooCommerce
- Woocommerce how to show most selling products by category
- AffiliateWP not calculating multiple quantities when using affwp_calc_referral_amount filter
- My custom button to add an item in the WooCommerce admin page doesn’t refresh the page
- Adding a column to woocomerce admin order page that can be sorted
- Fetch products with filter by similar categories at same time
- Hide a shipping method if cart total is higher than an amount
- WordPress error
- Trying query woocommerce product order by menu order and stock status
- editing product page template – getting template for related products not working
- Setting stock levels to “0” for all products in store using WP CLI
- How to change “reply to” email address for specific Woocommerce products
- Add field to category woocommerce page
- WordPress Pagination products with AJAX
- 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?