Title: Right of Withdrawal flow for shop
Author: Teet Bergmann
Published: <strong>3 ژوئن 2026</strong>
Last modified: 10 سپتامبر 2026

---

جستجوی افزونه‌ها

![](https://s.w.org/plugins/geopattern-icon/right-of-withdrawal-for-woocommerce.
svg)

# Right of Withdrawal flow for shop

 توسط [Teet Bergmann](https://profiles.wordpress.org/teetb/)

[دانلود](https://downloads.wordpress.org/plugin/right-of-withdrawal-for-woocommerce.1.1.0.zip)

 * [جزئیات](https://fa.wordpress.org/plugins/right-of-withdrawal-for-woocommerce/#description)
 * [نقد و بررسی‌ها](https://fa.wordpress.org/plugins/right-of-withdrawal-for-woocommerce/#reviews)
 *  [نصب](https://fa.wordpress.org/plugins/right-of-withdrawal-for-woocommerce/#installation)
 * [توسعه](https://fa.wordpress.org/plugins/right-of-withdrawal-for-woocommerce/#developers)

 [پشتیبانی](https://wordpress.org/support/plugin/right-of-withdrawal-for-woocommerce/)

## توضیحات

Right of Withdrawal flow for shop implements the consumer right of withdrawal mandated
by the European Union [Consumer Rights Directive (2011/83/EU)](https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX%3A32011L0083),
giving customers a clean, server-validated way to exercise their 14-day cooling-
off period.

The plugin adds a “Withdraw from order” button in the customer’s account, opens 
an accessible modal where customers can pick specific items, enter an IBAN and select
a withdrawal reason, then notifies the shop via HTML email and tracks the refund
through to completion.

#### Key features

 * Full or partial withdrawal — customers select specific items and quantities.
 * **Server-side amount calculation** — line totals are read from the order, never
   trusted from the client. Coupon discounts are correctly accounted for via `WC_Order_Item::
   get_total()`.
 * **IBAN format + Mod-97 validation** (works in any EU country with `bcmod` or 
   pure-PHP fallback).
 * Order-meta storage (withdrawal date, IBAN, reason, items, refund status).
 * Admin metabox with status updates: _Mark as refunded_ / _Mark as partially refunded_.
 * “Withdrawal” column and filter in **WooCommerce  Orders** — see pending requests
   at a glance without opening each order.
 * Optional automatic creation of an order refund record (with optional restock).
 * **Guest checkout support** — a withdrawal form page (`[rowfs_withdrawal_form]`
   shortcode) where customers without an account enter their order number and email
   and receive a secure, signed withdrawal link. Guest orders also get this link
   in the order email.
 * Direct link to the withdrawal modal from the order confirmation email. For registered
   customers the link opens their account “View order” page with standard WordPress/
   WooCommerce authentication — no custom login, no auto-login.
 * HTML emails for both customer and admin; styled inline for Gmail/Outlook compatibility.
 * HPOS (Custom Order Tables) compatible.
 * Settings page nested under the **WooCommerce** menu.

#### Compliance reference

 * [Directive 2011/83/EU on consumer rights](https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX%3A32011L0083),
   Articles 9–14 (Right of withdrawal).
 * The 14-day period is configurable; the plugin defaults to the directive’s prescribed
   minimum.
 * Refunds are processed to the bank account supplied by the consumer (IBAN), satisfying
   the directive’s requirement to use the same payment means _unless_ the consumer
   explicitly agrees to another method.

#### Requirements

 * WooCommerce 7.0 or later
 * PHP 8.0 or later
 * WordPress 6.0 or later

## نصب

 1. Upload the plugin folder to `/wp-content/plugins/`.
 2. Activate the plugin through the **Plugins** menu in WordPress.
 3. Go to **WooCommerce  Settings  Right of Withdrawal** and configure the settings.
 4. Pick the terms-and-conditions page and customise the button appearance.
 5. For guest orders: create a page with the `[rowfs_withdrawal_form]` shortcode and
    select it under **General  Withdrawal form page (guests)**.

## سوالات متداول

### Is the plugin HPOS compatible?

Yes. The plugin declares full compatibility with the WooCommerce Custom Order Tables(
HPOS) and uses the `WC_Order` meta API throughout — never `get_post_meta()` on the
order ID.

### Does the refund amount account for coupon discounts?

Yes. The plugin reads `WC_Order_Item::get_total()` (the post-coupon line total) 
plus `get_total_tax()`, so a customer returning a coupon-discounted item gets the
correct, post-discount refund.

### How do I change the withdrawal period?

Default is the EU-mandated 14 days. You can change the number and the unit (days/
months / years) in the settings, and choose whether the period starts from the order’s
payment date or completion date.

### Does the email button log the customer in automatically?

No. The button in the order email is a regular link to the customer’s “View order”
page. If the customer is not signed in, WordPress / WooCommerce shows the standard
login form and returns the customer to the same page after authentication. The plugin
does not implement its own login flow. For guest orders the button opens the withdrawal
form page via a signed link that authorises only the withdrawal form for that order—
it never logs anyone in.

### Where does the customer start a withdrawal request?

Registered customers: the “Withdraw from order” action button in **My Account  Orders**,
or the same button in the order confirmation email — both open the modal on the 
customer’s “View order” page. Guests (and anyone not signed in): the withdrawal 
form page with the `[rowfs_withdrawal_form]` shortcode, or the button in the order
email of a guest order.

### Can a customer submit more than one partial withdrawal for the same order?

Yes. The plugin tracks per-line cumulative withdrawn quantities — a customer can
return 1 of 3 items today, then 1 more next week. Further submissions are blocked
once every line has been fully accounted for.

### Does it work for guest checkout (no customer account)?

Yes. Create a page, add the `[rowfs_withdrawal_form]` shortcode and select it under**
WooCommerce  Settings  Right of Withdrawal  General  Withdrawal form page (guests)**.
The customer enters the order number and the email address used for the order; if
they match an order that is still within the withdrawal period, a secure link is
emailed to the billing address. The link opens the same withdrawal form as in My
Account. Guest orders also get the link directly in the order confirmation email.

The link is signed (HMAC over order ID, order key, billing email and expiry), is
valid until the withdrawal period ends and only authorises the withdrawal form for
that one order — it does not log anyone in. The lookup form always shows the same
response, so it cannot be used to check whether an order or email exists, and it
is rate-limited per IP.

### Which countries’ IBANs are accepted?

Any country that uses IBAN. The plugin validates the standard format (2-letter country
code + 2 check digits + up to 30 alphanumeric characters) and runs the Mod-97 checksum(
uses `bcmod` if available, falls back to pure PHP). Non-IBAN formats are rejected
at submit time.

### What happens when the admin clicks “Mark as refunded”?

If “Create WooCommerce refund automatically” is enabled (default), a `WC_Order_Refund`
record is created with the exact line items and amount the customer requested; the
order totals update accordingly, and stock is restocked if enabled. A confirmation
email is then sent to the customer. Without auto-refund, only the order status and
metadata are updated — no `WC_Order_Refund` is created.

### How do I see which orders have a pending withdrawal request?

Go to **WooCommerce  Orders**. The **Withdrawal** column shows the state of every
request (initiated / partial / refunded), and the **All withdrawal states** dropdown
next to the other filters narrows the list to pending or processed requests. When
requests are waiting, a notice at the top of the orders list links straight to them.

### Which address are the plugin’s emails sent from?

The sender name and address set in **WooCommerce  Settings  Emails  Sender options**—
the same as your regular order emails. If an SMTP plugin forces its own “From” address,
that setting takes precedence. The `rowfs_email_headers` filter lets you change 
the headers further.

### Where can I find the plugin’s settings?

**WooCommerce  Settings  Right of Withdrawal**. The tab has five sub-tabs: General(
notifications, deadline, terms page), Refund behaviour (auto-refund, restock), Withdrawal
button (label, colours), Modal appearance (colours, opacity, width) and Required
fields in modal (reason, IBAN, contact email, terms checkbox).

### Can I customise the list of withdrawal reasons shown to the customer?

Yes. The reasons are filterable. In a child-theme `functions.php` or a small custom
plugin:

    ```
    add_filter('rowfs_withdrawal_reasons', function ($reasons) {
        $reasons['gift_unsuitable'] = __('Gift was unsuitable', 'your-textdomain');
        unset($reasons['found_better_price']);
        return $reasons;
    });
    ```

## نقد و بررسی‌ها

نقد و بررسی‌ای برای این افزونه یافت نشد.

## توسعه دهندگان و همکاران

“Right of Withdrawal flow for shop” نرم افزار متن باز است. افراد زیر در این افزونه
مشارکت کرده‌اند.

مشارکت کنندگان

 *   [ Teet Bergmann ](https://profiles.wordpress.org/teetb/)
 *   [ peeterpaanike ](https://profiles.wordpress.org/peeterpaanike/)

[ترجمه “Right of Withdrawal flow for shop” به زبان شما.](https://translate.wordpress.org/projects/wp-plugins/right-of-withdrawal-for-woocommerce)

### علاقه‌ مند به توسعه هستید؟

[کد را مرور کنید](https://plugins.trac.wordpress.org/browser/right-of-withdrawal-for-woocommerce/)،
[مخزن SVN](https://plugins.svn.wordpress.org/right-of-withdrawal-for-woocommerce/)
را بررسی کنید، یا از طریق [RSS](https://plugins.trac.wordpress.org/log/right-of-withdrawal-for-woocommerce/?limit=100&mode=stop_on_copy&format=rss)
در [گزارش توسعه](https://plugins.trac.wordpress.org/log/right-of-withdrawal-for-woocommerce/)
مشترک شوید.

## گزارش تغییرات

#### 1.1.0

 * New: “Withdrawal” status column in WooCommerce  Orders (HPOS and legacy storage).
 * New: Orders list filter — Withdrawal pending / processed / any request.
 * New: Admin notice on the orders list when withdrawal requests are awaiting processing.
 * New: Guest withdrawal — `[rowfs_withdrawal_form]` shortcode page where customers
   without an account request a secure, signed withdrawal link by order number +
   billing email.
 * New: Guest orders get the signed withdrawal link in the order confirmation email(
   previously the button pointed to My Account, which guests cannot use).
 * New: Setting “Withdrawal form page (guests)” under General.
 * New: `rowfs_find_order_by_number` filter for stores using custom order numbers.
 * Fix: The “Counted from: Order completion date” setting is now respected — previously
   the period was always counted from the payment date.
 * Fix: Plugin emails are now sent from the WooCommerce sender name and address (
   WooCommerce  Settings  Emails) instead of the WordPress default address.
 * Fix: Admin notification email links to the correct order edit screen on stores
   without HPOS.
 * Tweak: Admin notification email sets Reply-To to the customer’s contact address.
 * Security: Signed-link pages are sent with no-cache and no-referrer headers.
 * Tested with WordPress 7.1 and WooCommerce 11.1.

#### 1.0.0

 * Initial public release.
 * EU Directive 2011/83/EU compliant withdrawal flow.
 * Inline-styled email button for Gmail/Outlook compatibility.
 * Coupon-aware refund math (uses `get_total()` not `get_subtotal()`).
 * HPOS support; partial-withdrawal item-level selection.

## اطلاعات

 *  نگارش **1.1.0**
 *  آخرین به‌روزرسانی **4 هفته پیش**
 *  نصب‌های فعال **کمتر از 10**
 *  نگارش وردپرس ** 6.0 یا بالاتر **
 *  آزمایش‌شده تا **7.1.3**
 *  نگارش PHP ** 8.0 یا بالاتر **
 *  زبان
 * [English (US)](https://wordpress.org/plugins/right-of-withdrawal-for-woocommerce/)
 * برچسب
 * [consumer rights](https://fa.wordpress.org/plugins/tags/consumer-rights/)[eu directive](https://fa.wordpress.org/plugins/tags/eu-directive/)
   [refund](https://fa.wordpress.org/plugins/tags/refund/)[returns](https://fa.wordpress.org/plugins/tags/returns/)
   [withdrawal](https://fa.wordpress.org/plugins/tags/withdrawal/)
 *  [نمایش پیشرفته](https://fa.wordpress.org/plugins/right-of-withdrawal-for-woocommerce/advanced/)

## امتیازها

هنوز هیچ نقدی ارسال نشده است.

[بررسی شما](https://wordpress.org/support/plugin/right-of-withdrawal-for-woocommerce/reviews/#new-post)

[مشاهدهٔ همهٔ بررسی‌ها](https://wordpress.org/support/plugin/right-of-withdrawal-for-woocommerce/reviews/)

## مشارکت کنندگان

 *   [ Teet Bergmann ](https://profiles.wordpress.org/teetb/)
 *   [ peeterpaanike ](https://profiles.wordpress.org/peeterpaanike/)

## پشتیبانی

چیزی برای گفتن دارید؟ نیاز به کمک دارید؟

 [مشاهده انجمن پشتیبانی](https://wordpress.org/support/plugin/right-of-withdrawal-for-woocommerce/)