=== Scut Ramburs – COD refusal protection for WooCommerce ===
Contributors: mariussirbu
Tags: cash on delivery, cod, refused orders, romania, woocommerce
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

COD refusal protection for WooCommerce: remembers customers who refused COD parcels and hides cash on delivery (ramburs) for risky orders.

== Description ==

Every refused cash-on-delivery parcel costs shipping both ways. Scut Ramburs keeps a history of delivery outcomes per customer and uses it at checkout.

* Two new order statuses: **Refused on delivery** and **Not picked up**, with bulk actions in the orders list.
* Customers are recognised by phone number and email, in any format (0740 123 456, +40 740 123 456, 0040740123456). Optionally also by delivery address.
* A **COD risk** column in the orders list and a history box on every order.
* Rules: show a warning after 1 refusal, hide cash on delivery after 2 (both configurable), manual allow and block lists.
* Works with the classic checkout and the block checkout. When cash on delivery is hidden, other payment methods stay available.
* Requires a valid phone number when the customer chooses cash on delivery (the courier needs it anyway). Skipped automatically if your checkout hides the phone field.
* Import past refusals from your existing orders or from a CSV export of your courier account.

= Privacy =

* Phone numbers, emails and addresses are stored only as salted, irreversible hashes (HMAC-SHA256), in a table on your own site.
* Customer data is never sent to the plugin author or to any third party. The only thing the plugin can send out is the optional error reports described below.
* Supports the WordPress personal data export and erasure tools, adds a suggested paragraph to your privacy policy and deletes old history automatically (36 months by default).

= Error reports (optional, off by default) =

Scut Ramburs can send error reports to its author, only if an administrator agrees: a question is asked once after activation, and the choice can be changed any time in WooCommerce > Settings > Scut Ramburs.

* Sent to: Sentry (sentry.io), the error tracking service used by the author, in its EU data region (ingest.de.sentry.io). The author's Sentry project is set not to store IP addresses.
* Sentry's terms of service: https://sentry.io/terms/ and privacy policy: https://sentry.io/privacy/
* What is sent: the error message and the plugin file and line where it happened; the versions of Scut Ramburs, WordPress, WooCommerce and PHP; whether HPOS is on; the site language; a random ID generated on your site.
* What is never sent: customer data (phone numbers and email addresses are masked), the site address, passwords or settings.
* When: only for errors raised by Scut Ramburs or Scut Ramburs Pro; each distinct error at most once a day, and at most 20 reports a day.
* Whether or not reports are sent, errors are written to WooCommerce > Status > Logs (source "scut-ramburs") on your own site.

== Installation ==

1. Install and activate the plugin. WooCommerce must be active.
2. Go to WooCommerce > Settings > Scut Ramburs and review the rules.
3. Go to WooCommerce > Scut Ramburs to import past refusals.
4. From now on, set the status of refused parcels to "Refused on delivery" or "Not picked up".

== Frequently Asked Questions ==

= Will a blocked customer know why? =

No. The checkout shows a neutral message you can edit, and the customer can still pay online.

= What happens to orders with the new statuses if I delete the plugin? =

They keep their status in the database. Move them to another status before deleting the plugin if you want them to stay visible in the default order views.

== Screenshots ==

1. The COD risk column in the orders list, with the new "Refused on delivery" and "Not picked up" statuses.
2. The delivery history of a customer, shown on every order.
3. At checkout, cash on delivery is hidden for a customer with repeated refusals.
4. Settings: when to warn, when to hide cash on delivery, allow and block lists.
5. Import past refusals from your orders or from a courier CSV file.

== Changelog ==

= 1.0.0 =
* First public release.
