Restrict Checkout Access
Restricts access to the WooCommerce checkout page based on user role, username, or guest status. Helps store owners control who can place orders based on defined access rules.
by Moshtafizur · github.com/moshtafizur-rahman-anty/restrict-checkout-access-plugin
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/moshtafizur-rahman-anty/restrict-checkout-access-plugin/archive/refs/heads/master.zipRestrict WooCommerce checkout access based on user roles, usernames, or guest status.
Description
Restrict Checkout Access gives WooCommerce store owners full control over who can access the checkout page.
You can block checkout access for:
- Specific user roles (like
Subscriber,Customer, etc.) - Specific usernames (comma-separated list)
- Guests (users who are not logged in)
When blocked users try to visit the checkout page, they will be shown a customizable message and redirected to the page they came from — no blank error screen or crashes.
Features
- Restrict checkout access by WordPress user roles
- Block checkout for specific usernames
- Prevent guests (non-logged-in users) from checking out
- Customize the message shown when access is denied
- Integrates natively with WooCommerce settings panel
- Clean, lightweight, and easy to use
Installation
- Upload the plugin folder to
/wp-content/plugins/ - Activate the plugin through the Plugins menu in WordPress
- Go to WooCommerce → Settings → Checkout Restriction to configure
Frequently Asked Questions
Where are the settings?
Go to WooCommerce → Settings → Checkout Restriction tab.
What happens when a blocked user tries to access checkout?
They are redirected back to the page they came from, and an error message is shown using WooCommerce's built-in notice system.
Can I block only guests?
Yes. Enable the "Block Guests" checkbox and leave other settings empty if you only want to restrict checkout for non-logged-in users.
Changelog
1.0.0
- Initial release
- Confirmed compatibility with WooCommerce HPOS (High-Performance Order Storage)
Upgrade Notice
1.0.0
First version of the plugin. Add user role and guest-based restrictions for checkout access.