strangerstudios / sitewide-sales

Run Black Friday, Cyber Monday, or other flash sales on your WordPress-powered eCommerce or membership site with WooCommerce, Easy Digital Downloads, and Paid Memberships Pro.
https://sitewidesales.com
GNU General Public License v3.0
2 stars 6 forks source link

Hide Banner by User Role for All Modules Except PMPro #81

Closed kimcoleman closed 2 years ago

kimcoleman commented 2 years ago

Is your feature request related to a problem? Please describe. In the PMPro module, we have a dropdown to hide the banner for logged in members by level. In WooCommerce, EDD, and the custom module, we could offer a similar download the hide the banner by user role.

Describe the solution you'd like A dropdown on the Edit Sitewide Sale > Banners metabox to select user roles.

Describe alternatives you've considered Here's a working code recipe with an example on filtering the banner display by role: https://gist.github.com/kimcoleman/8ee7d9150c1a3feeb63b03170f3da761

In this recipe, I also have examples for hiding banner if a user bought a specific EDD download by ID or has made any purchases in EDD.