Disable or invalidate coupons for guests #
To disable or invalidate coupons for logged-out visitors in Coupon by User Role for WooCommerce, go to WPFactory > Coupon by User Role, open the Availability section, and add the Guest role to Disable all coupons for selected user roles (hides the coupon field) or Invalidate all coupons for selected user roles (rejects codes). Guest targeting is free.
How guests are identified #
When a visitor is not logged in, Coupon by User Role assigns them the role key guest. Guest is one of the eight standard roles, so this works in the free version. It is a synthetic role the plugin adds, not a WordPress user account.
Step-by-step #
- Go to WPFactory > Coupon by User Role (also reachable at WooCommerce > Settings > Coupon by User Role).
- Open the Availability section.
- To hide the coupon field from guests, add Guest to Disable all coupons for selected user roles.
- To keep the field visible but reject codes from guests, add Guest to Invalidate all coupons for selected user roles instead.
- Click Save changes.
Which should you pick? #
- Disable removes the coupon box entirely, so guests never see that a promotion exists.
- Invalidate lets guests see and type a code, then rejects it with your custom message. This is the better nudge toward registration.
Use cases #
- Members-only sales: only logged-in customers can redeem codes.
- Registration incentives: show guests a “sign in to use this code” message.
- Abuse control: stop anonymous shoppers from cycling public codes.
Troubleshooting #
- The rule does not affect guests. Confirm you added Guest (not Subscriber or Customer) to the list, and test in a private browser window while logged out.
- Logged-in customers are affected too. Only Guest targets logged-out visitors. Remove any other roles you did not intend to include.
Get more control #
Guest targeting is free. Coupon by User Role for WooCommerce Pro adds every custom role, so you can combine guest rules with wholesale or membership roles. See what Pro unlocks.