Skip to content

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.

  • 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.

  1. Install WooCommerce and make sure it is active.
  2. Install Withdraw from Plugins > Add New, or upload the plogins-withdraw folder to /wp-content/plugins/.
  3. Activate it. Activation creates the {prefix}withdraw_requests table 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.
  4. Open WooCommerce > Withdrawal.
  1. Create a page (for example “Right of withdrawal”) and add the [withdraw_form] shortcode. The shortcode takes no attributes.
  2. On WooCommerce > Withdrawal, section Form page, select that page under Withdrawal form page. Until you do, the order button never renders.
  3. Section General: check Withdrawal period (days). The default is 14. See how the deadline is calculated before you change it.
  4. 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.
  5. 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.
  6. 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.
  7. Save changes. Every field has a ? marker next to it with inline help, reachable by keyboard.

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.

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.