=== ATH COD: Cash on Delivery Fees and Rules for WooCommerce ===
Contributors: athplugins
Tags: cash on delivery, cod, cod fee, αντικαταβολή, pay in store
Requires at least: 6.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

COD (cash on delivery, αντικαταβολή) fee and rules for WooCommerce, plus a "Pay in store" payment method for pickup. All free.

== Description ==

This plugin works on top of the cash on delivery (COD) payment method of WooCommerce. It adds a COD fee, an extra charge when the customer chooses cash on delivery, and it decides in which orders cash on delivery is offered at all. It also adds a "Pay in store" payment method for orders the customer collects (local pickup), so paying on pickup is not mixed up with paying the courier.

There is no paid version. Every feature below is in this plugin.

**Ελληνικά:** Χρέωση αντικαταβολής (έξοδα αντικαταβολής) και κανόνες για το πότε προσφέρεται η αντικαταβολή (COD) στο WooCommerce, μαζί με τρόπο πληρωμής «Πληρωμή στο κατάστημα» για παραλαβή από το κατάστημα. Το plugin έχει ελληνικό περιβάλλον και όλες οι λειτουργίες του είναι δωρεάν.

= The fee =

* A standard fee: a fixed amount or a percentage of products and shipping.
* Unlimited fee rules for the cases that cost you more or less: another fee per shipping zone, shipping method, postcode, order amount, weight and so on. A rule with fee 0 makes cash on delivery free, for example above an order amount.
* Tax on the fee, with the tax class you choose.
* Your own name for the fee, shown in the order totals, the emails and the order in the admin.
* The fee is shown under the cash on delivery option at the checkout, before the customer selects it.
* A notice of your own under the cash on delivery option, which you switch on and word yourself. For example, that the courier takes payment by card only.

= When cash on delivery is offered =

* A highest order amount and a highest cart weight.
* Unlimited rules that hide cash on delivery, each with its own message to the customer.

Every rule, for the fee or for availability, can look at:

* Shipping zone and shipping method
* Country and postcodes, with ranges (70000...74999) and beginnings (84*)
* Order amount, cart weight and number of items
* Products, product categories and shipping classes in the cart
* Customer role, and guests
* Products on backorder
* A coupon being used

= Pay in store =

* A payment method of its own, "Pay in store", for customers who collect their order.
* No fee, and none of the cash on delivery rules apply to it.
* Offered only with store pickup, or with every shipping method if you prefer.
* It can take the place of cash on delivery when the customer chooses store pickup, so the checkout does not show two options that mean the same thing.

= Protection =

* A list of emails and phones that do not get cash on delivery.
* Customers with a number of earlier cash on delivery orders that were cancelled, failed or refunded no longer see it.

The protection looks only at the orders of your own store. The plugin does not connect to any outside service and does not send customer data anywhere.

= Built for current WooCommerce =

* Classic checkout and block checkout. On the block checkout the fee needs WooCommerce 9.9 or newer.
* High-Performance Order Storage (HPOS).
* PHP 7.4 to 8.5.
* English and Greek included. Texts you type can be translated with WPML and Polylang.
* Light: one small option, no extra database tables, nothing loaded outside the checkout and its own settings screen.

= Guides and help =

* The plugin's page, with examples: [athplugins.com/plugins/cash-on-delivery](https://athplugins.com/plugins/cash-on-delivery/)
* Step by step guides, in English and Greek: [athplugins.com/docs/cash-on-delivery](https://athplugins.com/docs/cash-on-delivery/)

= Who makes it =

ATHPlugins is the plugin studio of [ATH Development](https://ath.dev), a web agency in Greece that builds and looks after WooCommerce stores. The plugins come out of that everyday work with real shops.

== Installation ==

1. Install and activate the plugin.
2. Make sure the Cash on delivery payment method is switched on in WooCommerce > Settings > Payments.
3. Go to WooCommerce > COD fees and rules, set the fee and add your rules.
4. Optional: switch on "Pay in store" in WooCommerce > Settings > Payments.

== Frequently Asked Questions ==

= Is there a paid version? =

No. Everything is in this plugin.

= Does it work with the block checkout? =

Yes. Cash on delivery is hidden and the fee is added in the same way as on the classic checkout. The fee on the block checkout needs WooCommerce 9.9 or newer. The message that explains why cash on delivery is hidden is shown on the classic checkout only.

= Do I type the fee with or without tax? =

Without tax. If "Add tax to the fee" is ticked, WooCommerce adds the tax on top.

= Several fee rules fit an order. Which one is used? =

The first one from the top. Use the arrows on a rule to change the order.

= How is a customer recognised for the unpaid orders check? =

By the email of the order, or by the account when there is no email yet. Only cash on delivery orders of this store are counted.

= Can developers change the result? =

Yes, with two filters: `athcod_fee` (the fee without tax) and `athcod_restriction_message` (null when cash on delivery is allowed, or the message to show).

== Screenshots ==

1. The standard fee and the fee rules.
2. A rule that hides cash on delivery, with its conditions.
3. The protection list.

== Changelog ==

= 1.1.3 =
* New: a notice of your own under the cash on delivery option at the checkout, which you switch on and word yourself. For example, that the courier takes payment by card only.

= 1.1.2 =
* Rules on products, categories and shipping classes now work in every language of a WPML or Polylang store.
* The translation of a rule message stays with it when rules are reordered.

= 1.1.1 =
* Fix: on the block checkout the fee now always follows the payment method the order is placed with.
* Fix: a saved "no tax" setting could be switched back on when settings were saved by code.

= 1.1.0 =
* New: "Pay in store" payment method for store pickup.
* New look for the settings screen.

= 1.0.0 =
* First release.
