=== ReturnKit – Returns, Refunds & EU Withdrawal Button for WooCommerce ===
Contributors: warnz, freemius
Tags: returns, refunds, rma, withdrawal button, eu withdrawal
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
WC requires at least: 8.6
WC tested up to: 11.1
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Returns and refunds portal plus the EU withdrawal button for WooCommerce. Customers request returns; you approve and refund in one click.

== Description ==

ReturnKit is a WooCommerce returns plugin (RMA) with a self-service returns portal, one-click refunds, and the EU withdrawal button that online shops selling to EU consumers need since 19 June 2026.

Returns by email are slow for you and your customers. Someone asks, you look up the order, send the address, wait for the parcel, then work out the refund by hand. ReturnKit turns that into a return request form your customers fill in themselves, and a short checklist for you: approve, mark the parcel received, refund.

= For your customers =

* **Return from My Account.** A Returns section, and a **Return items** button on every order that can still be returned.
* **Return as a guest.** Customers who checked out without an account enter their order number and email on the Returns page, and get a secure link by email. Order details are never shown on screen for an order number and email alone.
* **Pick items, quantities and a reason.** Only what's still returnable is offered. An optional note for you.
* **A page for every request.** Status, your return instructions and address, and a timeline of updates. Customers can cancel while the request is still waiting.
* **Clear emails** at every step, in your WooCommerce email design.

= For you =

* **Your returns policy.** Return period (30 days by default) from completion or from the order date, which order statuses qualify, your list of reasons, and exclusions for digital products, sale items, categories or single products.
* **Approve, receive, refund.** Approving emails the instructions and return address. Marking items received puts them back in stock. **Refund** creates a WooCommerce refund for exactly those items, through the payment gateway when it supports it.
* **A full history.** Every step, email and note is logged with who did it and when, and noted on the order.
* **A dashboard** with what needs you, the latest requests and a setup checklist. A requests list with filters, search and CSV export.
* **Notes and messages.** Keep private notes, or email the customer from the request.

= The EU withdrawal function =

From 19 June 2026, online shops selling to EU consumers need a withdrawal function on the site (Article 11a of the Consumer Rights Directive, added by Directive (EU) 2023/2673). ReturnKit provides it:

* a **"Withdraw from contract here"** button: on a withdrawal page, as an optional footer link, as a shortcode for menus and legal pages, on orders in My Account and in order emails;
* a form for the customer's name, the order and the email for the confirmation. Logged-in customers pick the order from a list, and can withdraw from single items;
* a separate **"Confirm withdrawal"** step before anything is sent;
* an **acknowledgement email straight away**, with the statement and the date and time it was received;
* an **audit log** of every step, including when the acknowledgement was sent;
* withdrawals that don't match an order are still recorded and acknowledged, for you to link to the right order. The public form shows everyone the same confirmation, so it can't be used to look up orders;
* withdrawals linked to an order can't be deleted: they're your record of the customer's statement;
* after a withdrawal from the whole order, the suggested refund includes delivery costs;
* a **checklist on the dashboard** that shows what's left to set up.

WooCommerce 11.1 added its own basic withdrawal form. ReturnKit tells you if both are switched on, so customers only ever find one.

ReturnKit is a tool, not legal advice. Your terms and withdrawal policy should mention the withdrawal function.

= Built to be safe =

* **Spam protection** for the public forms: a hidden bot trap, expiring form tokens, a minimum time on the form, a limit per IP address (with support for Cloudflare and proxies) and optional Cloudflare Turnstile.
* **No double claims.** Requests are checked under a lock, so a double click can never return the same item twice.
* **Crash protection.** If something goes wrong inside ReturnKit, your store keeps running and you get a notice with the details.
* **Built for HPOS** and the Cart and Checkout blocks. Templates can be overridden in your theme, and developers get hooks for every step.

= ReturnKit Pro =

A separate premium version, ReturnKit Pro, is available for stores that want to keep more of the money that comes back: exchanges, store credit, return labels, return insights, frequent-returner flags and automatic approval. Everything described above is in this free plugin and stays free.

= Documentation =

Guides, a settings reference, the EU withdrawal walkthrough and developer hooks are in the [ReturnKit documentation](https://warcal.dev/wordpress/plugins/returnkit/docs).

== Installation ==

1. Install and activate the plugin. WooCommerce must be active.
2. ReturnKit creates a **Returns** page and a **Withdraw from contract** page, and adds **Returns** to My Account.
3. Open **Returns → Settings** and add your **return address**. It's sent to customers when you approve a return.
4. Check the return period, eligible order statuses and reasons under **Settings → Returns**.
5. If you sell to EU consumers, open **Returns → Dashboard** and finish the **EU withdrawal checklist**. Usually that means turning on the footer link, or adding the withdrawal page to your footer menu.

== Frequently Asked Questions ==

= How do I add an EU withdrawal button to WooCommerce? =

Install ReturnKit. It creates a "Withdraw from contract" page with the withdrawal form, and you choose where the "Withdraw from contract here" button appears: the site footer, your footer menu, My Account, order emails, or anywhere with the `[returnkit_withdrawal_button]` shortcode. The dashboard checklist shows what's left to set up.

= Is ReturnKit an RMA plugin? =

Yes. Every return gets a return number (RMA), a status, a timeline and a history, from the customer's request to the refund.

= Do I need the EU withdrawal function? =

If you sell online to consumers in the EU, the law asks for it from 19 June 2026. If you don't, switch it off in the settings and use ReturnKit for returns only.

= What's the difference between a return and a withdrawal? =

A return follows your own policy: your period, your exclusions, your reasons. A withdrawal is the consumer's legal right: at least 14 days, no reason needed, and only legal exceptions can be excluded. ReturnKit keeps the two rule sets separate.

= WooCommerce has its own withdrawal form. Do I need both? =

No. Keep one switched on so customers don't find two different forms. ReturnKit's adds order and item selection, spam protection, statuses and an audit log, and warns you while both are on.

= Can a guest see someone else's order? =

No. The Returns page never shows an order for an order number and email alone. It emails a secure link to the order's billing address.

= Do refunds go back through the payment gateway? =

Yes, when the gateway supports automatic refunds, as Stripe, PayPal Payments and WooPayments do. Otherwise the refund is recorded in WooCommerce and you pay the customer yourself.

= Does it put items back in stock? =

Yes, by default, when you mark items received or refund. Untick it on the request for damaged items.

= Can I change the emails and templates? =

The emails are WooCommerce emails: edit their subject, heading and text under WooCommerce → Settings → Emails. Every template can be copied to `yourtheme/woocommerce/returnkit/` and edited there.

= What happens when I uninstall? =

Deleting the plugin removes its tables, settings, email settings and the product and order data it added, on every site of a multisite network. Order notes and WooCommerce refunds stay with the orders, and the Returns and withdrawal pages stay so you can decide what to do with them.

== External services ==

**Cloudflare Turnstile** is an optional spam-protection challenge for the public forms. It's off until you switch it on and enter your own Turnstile site key and secret key. Once enabled:

* the Returns and withdrawal forms load Cloudflare's Turnstile script from `challenges.cloudflare.com`, which collects technical browser signals to tell humans from bots;
* when a form is submitted, your server sends the challenge response, your secret key and the visitor's IP address to `https://challenges.cloudflare.com/turnstile/v0/siteverify` to confirm it.

Provided by Cloudflare, Inc.: [Terms](https://www.cloudflare.com/website-terms/), [Privacy Policy](https://www.cloudflare.com/privacypolicy/), [Turnstile privacy addendum](https://www.cloudflare.com/turnstile-privacy-policy/).

**Freemius** handles opt-in usage data, license activation and upgrades. The plugin connects to Freemius only when you:

* opt in on the welcome screen, which sends your site URL, WordPress and PHP versions, plugin version, and your name and email address;
* activate a license key, which sends the license key and your site URL;
* open the upgrade or pricing page, which loads the Freemius checkout.

If you skip the opt-in, nothing is sent until you activate a license or upgrade. See the Freemius [terms of service](https://freemius.com/terms/) and [privacy policy](https://freemius.com/privacy/).

== Privacy ==

To handle returns and withdrawals, ReturnKit stores the customer's name, email address, the order and items concerned, reasons and comments, the date and time, and the IP address of the submission, shortened by default (192.168.1.0 instead of 192.168.1.23). For withdrawals, the statement is kept exactly as submitted, as the record of when it was received. ReturnKit sets no cookies.

Requests are included in WordPress's personal-data export tool. The erase tool anonymizes them (name, email, IP address, comments and staff notes are removed) instead of deleting them, so refunds stay explainable in your books. Suggested privacy-policy text is added under Settings → Privacy.

== Screenshots ==

1. The dashboard, with the EU withdrawal checklist.
2. A withdrawal request in wp-admin: the customer's statement and the next steps.
3. The customer's return form: items, quantities and reasons.
4. The withdrawal acknowledgement shown to the customer, with the date and time.
5. My Account → Returns.
6. Settings, with safe defaults and one card per topic.

== Changelog ==

= 1.0.0 =
* First release: self-service returns from My Account and for guests, the staff workflow with gateway refunds and restocking, and the EU withdrawal function with confirmation step, acknowledgement email, audit log and setup checklist.

== Upgrade Notice ==

= 1.0.0 =
First release.
