Progress
Ok I am making progress with this. The feature that you have requested is done, and tested.
I can only set aside a bit of time each day to work on this though and I’m out of time for today.
There is one other unrelated feature that I’m working on for the next version, before I release the update.
Pre Release Feature
I don’t know how urgent your requirement is, but if you don’t want to wait, you can just drop the contents of this gist into the file in your installed copy of the plugin:
https://gist.github.com/rtpHarry/5d41e071580f57bbaeede5d1640f3b65
It won’t affect the update when its released, and it will get you the feature today.
Basically, you can now select “Customer Is A Guest” in each field to control how that is treated.
If you set a role in the allowed roles field, it will automatically exclude the guest role as well, is its not specified in the included list. You can add “Customer Is A Guest” to allow it.
If you set a role in the excluded roles field, it will not exclude the guest role as it wasn’t specified in the excluded list. You can add “Customer Is A Guest” to block them.
Use Case
I am still surprised that two users immediately bumped into this issue. Out of curiosity, what was it that you were trying to implement?
I had assumed that if you were wanting to restrict a coupon to only be used by a specific role, that it would not be for guest users as well.
Is your scenario that you wanted to block certain existing users from using the coupon, but allow guests or certain roles?