Getting started
Withdraw needs one page and one setting before it is usable: a page containing the [withdraw_form] shortcode, selected on the settings screen so the order button knows where to link.
Before you start
Section titled “Before you start”- WordPress 6.5 or newer
- WooCommerce 8.0 or newer (tested up to 11.0)
- PHP 8.1 or newer
The plugin header declares Requires Plugins: woocommerce. If WooCommerce is missing or inactive, Withdraw prints an admin notice and does not boot.
You need the manage_woocommerce capability to see either admin screen.
Install
Section titled “Install”- Install WooCommerce and make sure it is active.
- Install Withdraw from Plugins > Add New, or upload the
plogins-withdrawfolder to/wp-content/plugins/. - Activate it. Activation creates the
{prefix}withdraw_requeststable and seeds the default settings. The same install runs again on the first admin load of any site that missed activation, which is what makes Multisite work. - Open WooCommerce > Withdrawal.
Set up the withdrawal page
Section titled “Set up the withdrawal page”- Create a page (for example “Right of withdrawal”) and add the
[withdraw_form]shortcode. The shortcode takes no attributes. - On WooCommerce > Withdrawal, section Form page, select that page under Withdrawal form page. Until you do, the order button never renders.
- Section General: check Withdrawal period (days). The default is 14. See how the deadline is calculated before you change it.
- Section Eligibility: review Eligible order statuses. The list is built from
wc_get_order_statuses(), so your custom statuses appear too. The default is Completed and Processing. Saving with nothing checked falls back to those two. - Section Emails: optionally set a Notification email. When blank, shop notifications go to the site admin email. The customer confirmation always goes to the billing email on the order.
- Section Legal texts: replace the Form intro text and the Model withdrawal text. Both ship with short placeholder defaults; the model text in particular is a paraphrase, not the statutory Annex I.B wording, and it contains a
[seller name and address]placeholder you must fill in. - Save changes. Every field has a
?marker next to it with inline help, reachable by keyboard.
Verify the flow
Section titled “Verify the flow”Open the withdrawal page in a private window.
- Step one asks for an order number and a billing email. Enter a test order in an eligible status.
- Step two shows the deadline date, one quantity field per order line capped at the ordered quantity, an optional reason field, the model withdrawal text and the declaration checkbox.
- Submit. A confirmation naming the request ID, the order number and the withdrawn items replaces the form. The customer address receives a plain-text confirmation and the notification address receives a plain-text notification. Both list the items and the reason, printing “(none given)” when no reason was entered.
Then open My Account > Orders and view an eligible order. A Withdraw from contract here control appears under the order details table and opens the withdrawal page with the order number pre-filled (the email field is always left blank). That control only reaches a signed-in customer looking at that order, so for guests and for the rest of the withdrawal period add the [withdraw_link] shortcode to a menu or legal page, or switch on the footer link.
Two things to know about that button:
- It hangs on the WooCommerce order details template hook, so it also appears on the order received page straight after checkout, not only in My Account.
- It checks the order status only. It stays visible on an order whose withdrawal period has expired or that already has an open request; the customer clicks it and gets the refusal message on the form instead.
Manage requests
Section titled “Manage requests”Every submitted request lands on WooCommerce > Withdrawal Requests with its ID, order, customer email, items, date and status. Filter by status with the All / Pending / Accepted / Rejected / Processed links, pick a new status in the row dropdown and click Save.
Changing a status only writes the row. No email is sent to the customer, so if you accept or reject a declaration, contact the customer yourself. Issue any refund on the normal WooCommerce order screen; Withdraw does not touch payments.