Hi @misterbirra ,
Thank you for reaching out!
I understand you’re looking to create two types of coupons in your WooCommerce store: public coupons and admin-only coupons, based on user roles like Administrator. By default, WooCommerce doesn’t offer this functionality in its core settings. Implementing this feature will require either a plugin or custom code.
In that case, you can use the Coupon Restrictions for WooCommerce plugin. This plugin allows you to restrict coupon usage based on user roles, including guests. You can specify which roles are allowed or excluded from using a coupon, making it a convenient solution for your requirements.
WooCommerce offers a 30-day refund policy, so you can test the extensions and make sure they meet your needs. If you have any questions before purchasing, you can reach out to us at WooCommerce.com → My Account → Support (you’ll just need to create an account if you don’t already have one).
However, If you prefer not to use a plugin, you can achieve similar functionality by adding custom code. This involves:
- Adding a custom field to the coupon settings to specify allowed user roles.
- Modifying the coupon validation process to check the user’s role before applying the coupon.
This tutorial provides a helpful guide and code snippet for restricting WooCommerce coupons based on user roles: Restrict WooCommerce Coupons Based on User Roles
I tried to create a coupon and set it to “Privately Published,” but when I try to use it from the admin panel, it still returns “This coupon does not exist.”
This happens because Privately Published coupons are not accessible on either the frontend or backend. As a result, you’ll encounter the This coupon does not exist error even when attempting to use it in the admin panel.
I hope this helps clarify things!