--- title: Block a customer from placing orders in WooCommerce description: WooCommerce has no built-in customer block. This plugin adds a checkbox to the user profile that stops blocked accounts at checkout and add-to-cart. source: https://steem.dev/blog/woocommerce-block-customer-from-ordering published: 2026-09-04 updated: 2026-10-31 site: Steem — AI WordPress plugin generator --- # Block a customer from placing orders in WooCommerce WooCommerce has no way to stop a particular customer ordering. There is no ban button, no block setting and nowhere in the admin to mark an account as unwanted. The only built-in option is deleting the account, which is permanent and takes the order history with it. Stores dealing with serial chargebacks, abusive returns or fraud need something simpler: a checkbox that keeps the account on record and stops new orders. The plugin puts a 'Block from placing orders' toggle on the user profile in wp-admin and refuses add-to-cart and checkout for any account where it is ticked. ## What one build covers - Checkbox and block reason field on the user profile admin screen - Blocked at add-to-cart with a visible notice before reaching checkout - Blocked at checkout submission before any order is created - Block is fully reversible without deleting the account or its order history ## What it does not cover - Guest checkout: a blocked user can place orders without logging in - Blocking by email address, IP address, or country - WooCommerce Subscriptions automatic renewal blocking - Bulk blocking or importing a list of accounts - Logging of blocked order attempts or admin notifications when a block triggers ## The prompt ```text Build a WordPress plugin that blocks specific WooCommerce customers from placing orders. Add two fields to the user profile edit screen using the edit_user_profile and show_user_profile actions: a checkbox with the label 'Block from placing orders' and a text input labeled 'Block reason (internal notes only)'. Save both fields as user meta using personal_options_update and edit_user_profile_update. Show the block reason field only to users with the manage_woocommerce capability. In a woocommerce_add_to_cart_validation filter, check whether the current logged-in user has the block meta set to '1', and if so call wc_add_notice() with a plain message saying the account cannot place orders at this time, then return false. In a woocommerce_checkout_process action, repeat the same check and call wc_add_notice() with the same message if blocked. Register all hooks inside a function that fires on the woocommerce_loaded action so the plugin does nothing on sites without WooCommerce active. ``` ## Roles do not stop checkout WooCommerce inherits WordPress user management, which is built on roles and capabilities. You can strip every role from a user and they can still order, because checkout asks whether the product is purchasable and the cart is valid, not whether the buyer has been marked as unwanted. Deleting the account stops orders, but it also deletes the order history and breaks references to that user in the database. In a chargeback dispute, that history is exactly what you need. Plugins sold as WooCommerce user management mostly do analytics: lifetime value, login frequency, last order date. Stopping one account from buying again is a different problem, and they do not touch it. ## A checkbox and a private reason on the profile The user profile edit screen gets two fields: the 'Block from placing orders' checkbox and a text field for the reason. The reason is stored as user meta and shown only to users with the `manage_woocommerce` capability, so it works as an internal note the customer never sees. A blocked customer who adds a product to the cart gets a plain error notice and the item is not added. If they reach checkout through a cached page or a direct URL, the same check runs on submission and the order is refused before it exists. The notice does not say they are blocked, and its wording can be edited in the plugin file. Untick the box and save to lift the block immediately. The flag is user meta, so existing orders and the account itself stay exactly as they were. ## Chargebacks and serial returns A buyer who disputes every purchase after delivery costs you money on each order. Blocking the account after the second chargeback breaks the cycle without erasing the purchase record. A customer who orders, uses and returns on a loop costs you every time too. Blocking stops new orders and keeps the history in place if a refund dispute arrives later. In both cases the account stays, and you never have to juggle roles across the rest of the site. ## Guests, many accounts and renewals The check is against the logged-in user ID, so it does nothing against guest checkout. A blocked person can check out as a guest with another email address. WooCommerce's own 'Blocked email addresses' field under WooCommerce > Settings > Accounts and Privacy stops specific addresses at checkout without a plugin. If fraud comes from many accounts rather than one, blocking them one at a time will not keep up; payment gateway fraud rules or a fraud detection plugin fit that scale. Blocking by IP, country or email domain pattern is outside this build too. WooCommerce Subscriptions renewals are scheduled payments that never pass through add-to-cart or checkout, so a block does not stop them. A follow-up message can add a note on the profile showing when the customer last tried to order, so you can see the block firing, or a bulk action on the Users table to block and unblock several accounts at once. --- Source: https://steem.dev/blog/woocommerce-block-customer-from-ordering Build this plugin: https://steem.dev/app