Restrict WooCommerce Subscriptions Creation Process to Specific User Roles

Here’s how you can restrict the WooCommerce Subscriptions creation process to some specific user roles only.

Since WordPress is based on user capabilities, you can simply edit the capability corresponding to the role you want to target. This snippet will simply remove “Simple Subscription” and “Variable Subscription” from the products dropdown select:

Of course, this won’t remove links from the menu or fields in the product data metabox, but it’s a good start 😉

About the author

Remi Hey! My name is Rémi Corson, I'm a French WordPress Developer, I code stuff and I write from time to time ;-) Buy a coffee
Show your support

Related Posts

0 comments

Leave a Reply