=== Block Emails & Addresses for WooCommerce Checkout ===
Contributors: conschneider
Donate link: https://conschneider.de/donate
Tags: woocommerce, block, emails, spam, fraud
Requires at least: 5.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Block emails, shipping addresses, phones, names and IPs during WooCommerce checkout — including block checkout and express payment buttons.

== Description ==

Block Emails & Addresses for WooCommerce lets you stop unwanted customers at checkout. The order is rejected before payment is taken, and you can customize the error message shown to the blocked customer.

**Block by:**

* **Email** — exact address (`spam@spammy.org`), whole domain (`@spammy.org`) or TLD (`.xyz`)
* **Shipping address** — substring patterns checked against all address fields, or `r:` regex; also catches street/number split across address lines 1 and 2
* **Phone** — digit-normalized substring matching, so `5256016` catches `302-525-6016`, `(302) 525-6016` and `+13025256016` alike; `r:` regex supported
* **Name** — case-insensitive fragments against billing/shipping first and last names; `r:` regex supported
* **IP** — exact IPs and CIDR ranges (`119.237.8.0/24`), with `#` comment lines

**Covers every checkout path:**

* Classic (shortcode) checkout
* Block checkout (Store API)
* Express payment buttons — Apple Pay, Google Pay, PayPal — which bypass the classic checkout validation

**Keeps you informed:**

* Counters of blocked checkout attempts (with reset buttons)
* A recent-blocks log on each settings page showing the matched rule, attempted value and IP
* Full history in WooCommerce > Status > Logs (source `wc-block-emails`)

Matching is case-insensitive. Nothing is blocked until you add an entry.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/wc-block-emails` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Use the WooCommerce->Block Emails and WooCommerce->Block Addresses screens to configure the plugin.

== Frequently Asked Questions ==

= What does this plugin do? =

It blocks checkouts by email, shipping address, phone, name or IP during the WooCommerce checkout process.

= How do I use the plugin? =

After installing and activating the plugin, go to WooCommerce->Block Emails for email rules (one per line: `spam@spammy.org`, `@spammy.org` or `.xyz`) and WooCommerce->Block Addresses for address, phone, name and IP rules.

= Does it work with the block checkout and express payment buttons? =

Yes. The checks also run on the Store API, which covers the block checkout and express buttons such as Apple Pay, Google Pay and PayPal.

= I used the separate Block Addresses for WooCommerce plugin. Do my rules carry over? =

Yes. This plugin uses the same settings storage, so existing address/IP/phone/name rules are picked up automatically. Deactivate the old plugin after updating so the checks don't run twice.

== Screenshots ==

1. Block Emails settings — email blocklist, error message, blocked counter and recent-blocks log.
2. Block Addresses settings — address, IP, phone and name rules with counter and recent-blocks log.

== Changelog ==

= 1.1.0 =
* Merged in Block Addresses for WooCommerce: block by shipping address (substring or regex, including street/number split across address lines), phone (digit-normalized), name and IP (exact or CIDR). New screen: WooCommerce > Block Addresses.
* Existing Block Addresses settings carry over automatically (same storage keys).

= 1.0.5 =
* Block on the Store API: block checkout and express payment buttons (Apple Pay, Google Pay, PayPal) no longer bypass the blocklist.
* Case-insensitive matching.
* Blocked-attempts counter with reset button.
* Recent-blocks log on the settings page (matched rule, email, IP) plus full history in WooCommerce > Status > Logs. Log source filterable via `woob_log_source`.
* Declare WooCommerce as a required plugin.

= 1.0.2 =
* Declare HPOS compatibility.

= 1.0.1 =
* You can now enter TLDs (top-level domains) to block all email addresses from that domain. Example: .org will block all email addresses ending in .org.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.1.0 =
* New: block by shipping address, phone, name and IP — see WooCommerce > Block Addresses.

= 1.0.5 =
* Express payment buttons (Apple Pay, Google Pay, PayPal) and the block checkout are now covered by the blocklist.

= 1.0.2 =
* HPOS compatibility.

= 1.0.1 =
* TLDs are now supported.

= 1.0.0 =
* Initial release.
