SQ User Blocker
WordPress/WooCommerce plugin — block selected customers from adding products to cart with individual messages and configurable time periods.
by Sławomir Zieliński · github.com/pzp-slawomir/sq-user-blocker · website
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/pzp-slawomir/sq-user-blocker/archive/refs/heads/master.zipWC requires at least: 6.0 WC tested up to: 9.0 Stable tag: 1.0.2 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html
Block selected WooCommerce customers from adding products to cart with individual messages and configurable time periods.
Description
SQ User Blocker allows store administrators to block selected registered customers from adding products to the cart. Each block can have:
- Individual message displayed to the blocked user when they attempt to add a product.
- Configurable time period (start and end date). By default the block starts immediately and lasts indefinitely.
- Activate / Deactivate / Delete controls for easy management.
Email-based persistence
Blocks are tied to the customer's email address, not just their WordPress user ID. If a blocked customer deletes their account and re-registers with the same email, the block is automatically re-applied to the new account.
Anti-bypass protection
The plugin validates at multiple levels to prevent circumvention:
- Add-to-cart validation (Classic and WooCommerce Blocks / Store API)
- Cart page validation
- Checkout validation (including billing email check)
- Guest checkout with a blocked email is also prevented
Admin panel
A dedicated page under WooCommerce > User Blocker provides:
- AJAX-powered user search (Select2) by name or email
- Custom message editor (basic HTML supported)
- Date range picker for the block period
- Table of all blocks with status badges (Active, Inactive, Scheduled, Expired)
Compatibility
- Classic WooCommerce cart and checkout
- WooCommerce Blocks (Store API) cart and checkout
- WooCommerce High-Performance Order Storage (HPOS)
Installation
- Upload the
sq-user-blockerfolder to/wp-content/plugins/. - Activate the plugin through the Plugins menu in WordPress.
- Make sure WooCommerce is installed and active.
- Go to WooCommerce > User Blocker to manage blocks.
Frequently Asked Questions
Does the plugin require WooCommerce?
Yes. The plugin will deactivate automatically if WooCommerce is not active.
What happens when I leave the "Blocked Until" field empty?
The block will last indefinitely (lifetime) until you manually deactivate or delete it.
What happens if a blocked user already has items in the cart?
They will see the block message on the cart and checkout pages and will not be able to complete the purchase.
Can a blocked user bypass the block by changing their email?
No. Blocks are matched by both email and user ID. If a user changes their account email, the stored email in the block record is automatically synchronised. The block remains active regardless of email changes.
Can a blocked user bypass the block by checking out as a guest?
No. The plugin validates the billing email at checkout, so even guest checkout with a blocked email address will be rejected.
What happens if a blocked user deletes their account and creates a new one?
The block persists. It is tied to the email address, and when a new account is registered with the same email, the block is automatically linked to the new account.
What capability is required to manage blocks?
The manage_woocommerce capability (typically Shop Manager and Administrator roles).
Screenshots
- Admin panel — adding a new block with user search, message, and date range.
- Admin panel — table of blocked users with status badges and action links.
- Frontend — error message displayed when a blocked user tries to add a product to the cart.
Changelog
1.0.2 — 2026-04-08
- WooCommerce dependency enforcement with admin notice and install link.
- Cart clearing on login — guest cart is emptied when a blocked user logs in.
1.0.1 — 2026-04-08
- Dual blocking key: email + user ID — prevents bypass by changing account email.
- Email synchronisation on profile update — block follows email changes.
1.0.0 — 2026-04-08
- Initial release.
- Add / edit / delete / toggle user blocks.
- Individual messages per blocked user.
- Configurable block period (start date, end date, or indefinite).
- Email-based persistence across account deletion and re-registration.
- Classic WooCommerce support (add-to-cart, cart, checkout validation).
- WooCommerce Blocks / Store API support.
- Billing email validation at checkout (prevents guest checkout bypass).
- HPOS compatibility declared.
- AJAX user search with Select2 (selectWoo).
- Status badges: Active, Inactive, Scheduled, Expired.
Upgrade Notice
1.0.2
WooCommerce dependency enforcement and cart clearing on login for blocked users.
1.0.1
Dual blocking key and email synchronisation to prevent bypass by changing account email.
1.0.0
Initial release.