=== WpDevArt: Cancel & Edit Orders for WooCommerce ===
Contributors: wpdevart
Tags: woocommerce, cancel order, edit order, change order, refund
Requires at least: 6.1
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Let customers change or cancel their WooCommerce orders for a set time after checkout, with refunds and pay-the-difference links handled for you.

== Description ==

"Can I change my order?" is one of the most common emails a store gets: a wrong size, one item too many, an old address, a gift message to fix. Our **Cancel & Edit Orders for WooCommerce** plugin lets customers make these changes themselves, for a time you choose after they order, before anything is packed.

Every change settles the money the right way. Customers see what changes, what is refunded and what is left to pay before they confirm. Fewer items or a cheaper size are refunded through the payment method; more items or a dearer size get a small pay-the-difference link, and the change is made once it is paid. You keep the same order number, normal WooCommerce refunds and a note for every change.

Everything in the free plugin stays free.

➡ **[GET PREMIUM VERSION NOW!](https://wpdevart.com/woocommerce-order-cancel-edit-plugin)**

[GET SUPPORT](https://wordpress.org/support/plugin/wpdevart-cancel-edit-orders-for-woocommerce/)

https://www.youtube.com/watch?v=cL3rP1MfEE4

= Free version features =

* **A time to change or cancel** — From 5 minutes to 30 days after payment (60 minutes by default), with a separate time for cancellations if you want one. Counted in your store's time zone.
* **Choose the order statuses** — Processing and On hold by default. Unpaid orders can be cancelled while they wait for payment.
* **Stops when the order ships** — Completed orders, tracking numbers (WooCommerce Shipment Tracking, Advanced Shipment Tracking, AfterShip), WooCommerce's own fulfilment status and shipping labels (WooCommerce Shipping) close changes at once, even inside the time.
* **Optional "Open for changes" status** — Paid orders wait in their own status until the time is over, so warehouse and shipping tools don't pack them too early. They move to Processing when the time ends, when the customer clicks "All good" or when you release them.
* **Products that can't be changed or cancelled** — Per product or per category, for example final-sale items. Bundles, composite products, subscriptions, bookings and gift cards are locked automatically.
* **Cancel the whole order** — As a request you approve (the default) or at once, with an automatic refund through the payment method.
* **Cancel single items or lower a quantity** — Only those items are refunded, with the right tax for each line.
* **Cancellation reasons** — Your own list, required or optional, with a comment box.
* **Requests screen** — Approve or decline with a message, one by one or in bulk. Customers can withdraw a request.
* **Unpaid orders cancel at once** — Orders waiting for payment, unpaid bank transfer and cheque orders, and cash on delivery orders, with the items back in stock. It replaces WooCommerce's own Cancel button, which asks no reason.
* **Shipping address and phone** — Changed at once when the shipping cost and tax stay the same; otherwise sent to you as a request.
* **Billing address and phone** — The billing email address can never be changed online.
* **Size, colour and other options** — Same price: nothing to pay. Higher price: the customer pays the difference. Lower price: the difference is refunded.
* **Quantities** — More units: the customer pays the difference. Fewer units: refunded. Stock and the product's quantity rules are respected.
* **Order note** — The delivery instructions or gift message written at checkout.
* **"All good" button** — Customers confirm that nothing needs changing, which closes their time early.
* **Money settled on every change** — A preview before confirming; normal WooCommerce refunds for each line and tax rate; the order number never changes.
* **Automatic refunds** — Through payment methods that support WooCommerce refunds, such as Stripe and WooPayments. When a method can't refund, the order is flagged "Manual refund needed" and you get an email. Card payments that are only authorised are released when the order is cancelled, never partly refunded.
* **Pay the difference** — A change that costs more creates a small linked order with a pay link. The change is made once it is paid, and an unpaid link is cancelled after the time you set (24 hours by default), or earlier when the customer's time to change the order ends.
* **Cash on delivery and bank transfer** — Nothing to refund before the money arrives: unpaid orders are simply changed.
* **Clear money rules** — Shipping is refunded only when the whole order is cancelled, a coupon keeps the discount paid on each line, and free shipping stays after a partial cancellation.
* **Safe with several currencies** — Refunds and pay links always use the order's own currency. A change that needs a new price in another currency asks the customer to contact you.
* **Buttons where customers look** — The thank-you page (classic and block checkout), the My Account orders list and order page, and a link in the order confirmation emails, with the time left.
* **The "Change my order" page** — One page for every change, with a preview of the totals. It works on phones and in classic and block themes, and uses your theme's look.
* **Guests too** — Secure links that expire. In another browser, guests first type the email address of their order. Opening a link never changes anything by itself.
* **Seven emails** — Order changed, Order cancelled, Request received and Request declined for customers; Customer changed an order, New request and Manual refund needed for you. Each has its own subject, heading and on/off switch, and works with WooCommerce's block email editor (WooCommerce 10.8 or newer).
* **Block, shortcode and Elementor widget** — The time left and the buttons on a custom thank-you page or any other page.
* **Every text editable** — Button labels and messages with placeholders. Translation ready, WPML and Polylang ready.
* **"Changes" column and filter** — See which orders customers can still change, which wait for your decision and which need a manual refund.
* **Order screen box** — Close changes now, give 24 hours more, release the order for packing, copy the customer's change link, cancel and refund, and see linked difference orders with their pay links.
* **Every change in the order notes** — What changed, what was refunded and who did it.
* **Test mode and setup checklist** — Only shop managers see the buttons until you switch to everyone.
* **30-day summary** — Orders changed and cancelled, items cancelled, money refunded and collected, and support emails saved.
* **Invoices stay correct** — Changes are normal WooCommerce refunds and orders, so invoice plugins handle them like any other refund or order.
* **Works with the other WpDevArt plugins** — Estimated Delivery Date, Pre-Orders, Request a Quote and Duplicate & Repeat Orders. See the FAQ.
* **Privacy first** — No outside services. The plugin's data is part of WordPress' personal data export and erasure, and it suggests text for your privacy policy.

= Premium version features =

* **Changes open until your dispatch cut-off** — Open until your daily packing time, skipping weekends and holidays.
* **Rules** — Different times and permissions by customer role, guests, payment method, shipping method, order total, product, category and country.
* **Limits against abuse** — How often a customer can change or cancel.
* **Address changes with new shipping and tax** — Worked out again for the new address, and the difference is charged or refunded.
* **Add products to an order** — Customers add products to the order they already placed, shipped in the same parcel.
* **Swap for a different product** — Replace an item with another product from groups you allow.
* **Change or upgrade the shipping method** — Upgrade to express or switch to local pickup.
* **Apply a forgotten coupon** — The discount is refunded to the customer.
* **Ask for any other change** — A free-text request for changes the plugin can't make by itself.
* **Charge the saved card** — Stripe and WooPayments charge the difference to the card used at checkout, with no pay link.
* **Reminders for unpaid differences** — Reminder emails, then the change is reversed if it stays unpaid.
* **Payment method overview** — Which payment methods refund automatically and which can charge a saved card.
* **Refund rules** — Choose how shipping, coupons and free-shipping minimums are handled after a change.
* **Cancellation and restocking fees** — A fixed or percentage fee that can rise with time since the order.
* **Store credit with a bonus** — Customers choose money back or store credit, for example 110% of the amount.
* **Style options with a live preview** — Colours, button style and countdown style.
* **Stricter address checks** — PO boxes, military addresses, house numbers and postcode formats.
* **Edit paid orders yourself** — Change items and addresses from the order screen, with refunds and pay links handled for you.
* **Activity log** — Search every change and export it as CSV.
* **Webhooks and a daily digest** — For your warehouse and your inbox.
* **Suggested products while editing** — Up-sells, cross-sells or your own picks on the change page.
* **"Add to your order" offers** — A one-click offer on the thank-you page and in the confirmation email.
* **Save the cancellation** — Offer a discount, a size swap, an address fix or store credit before the customer cancels.
* **EU withdrawal** — A link to the right withdrawal form, and withdrawals processed with automatic refunds.
* **Multi-currency stores** — Swaps, extra units and new products priced in the order's currency through WPML, CURCY, Aelia or WooPayments.
* **Reports** — Cancellation reasons, saved sales and the products customers swap most.

➡ **[GET PREMIUM VERSION NOW!](https://wpdevart.com/woocommerce-order-cancel-edit-plugin)**

= Changing and editing orders =

Customers open one "Change my order" page from My Account, the thank-you page or the link in their order email. For the time you allow after they order, they can fix the shipping or billing address and phone, switch an item to another size or colour that is in stock, change a quantity or rewrite the order note. 

Before anything is saved, a preview shows what changes and what it costs. An address that keeps the same shipping cost and tax is changed at once; one that would change them comes to you as a request. Products you lock, such as made-to-order or final-sale items, stay as they are, and bundles, composite products, subscriptions, bookings and gift cards are never changed online.

= Cancelling orders =

Customers can cancel the whole order, or just one item or a few units, and tell you why from your own list of reasons, with an optional comment. You decide how paid orders are cancelled: as a request that waits on the Requests screen, where you approve or decline it with a message, one by one or in bulk, or at once with an automatic refund. 

Customers can withdraw a request they no longer need. Orders that are not paid yet, such as bank transfer, cheque and cash on delivery orders, cancel straight away, and their items go back in stock. The plugin's Cancel button replaces WooCommerce's own one, which asks no reason.

= Refunds and paying the difference =

Every change settles the money with normal WooCommerce refunds and orders, so your reports and invoice plugins stay correct. Refunds go back through payment methods that support WooCommerce refunds, such as Stripe and WooPayments, with the right amount and tax for each line. 

When a payment method can't refund by itself, the order is marked "Manual refund needed" and you get an email. A change that costs more creates a small linked order with a pay link: the change is made once it is paid, and an unpaid link is cancelled after the time you set. Card payments that were only authorised are released when the order is cancelled, never partly refunded, and refunds and pay links always use the order's own currency.

= Time to change, and keeping orders away from packing =

You choose how long customers can change or cancel an order, from 5 minutes to 30 days after payment, counted in your store's time zone, and for which order statuses. Changes close by themselves as soon as the order ships: when it is completed, gets a tracking number or gets a shipping label, even if time is left. 

If your warehouse or shipping tool picks up Processing orders, turn on the "Open for changes" status: paid orders wait in it until their time ends, the customer clicks "All good", or you release them for packing from the order screen.

= Guests, emails and where customers find the buttons =

Logged-in customers find the Change and Cancel buttons in My Account and on the thank-you page, with the time left. Guests use a secure link in their order emails that stops working soon after the time to change ends. In another browser they first type the email address of their order, and opening a link never changes anything by itself. 

Seven emails keep both sides informed, from "Order changed" for the customer to "Manual refund needed" for you, each with its own subject, heading and on/off switch. A block, a shortcode and an Elementor widget place the buttons on any page, and test mode shows them only to shop managers until you are ready.

= Advanced rules and limits (Premium) =

The Premium add-on gives different orders different freedom. A rule matches orders by customer type, role, payment method, shipping method, shipping zone, country, product, category or order total. It then sets its own time to change, whether changes and cancelling are allowed, and whether a paid order is cancelled at once or as a request. 

For example: wholesale buyers get two days, cash on delivery orders can only be cancelled, and orders over a set total always need your approval. Changes can also stay open until your next dispatch cut-off, skipping weekends and holidays, and limits stop customers from changing or cancelling too often.

= Built for today's WooCommerce =

* Works with High-Performance Order Storage (HPOS) and the classic posts storage.
* Works with the Cart and Checkout blocks and the classic cart and checkout, block themes and classic themes.
* Shop managers can change the settings and handle requests. No ads outside the plugin's own screens.
* Templates can be overridden from your theme.

= Who is it for? =

* **Fashion and shoe stores**: the wrong size fixed in a minute, without a return.
* **Every store that answers "can I change my order?" emails**: customers fix the address, the quantity or the note themselves.
* **Stores that pack quickly**: the optional "Open for changes" status keeps orders away from packing until the time is over.

= Developer friendly =

* Shortcode: `[wpdevart_ceo_order_actions order_id="123"]` (leave out the ID for the order of the page). Block: `wpdevart-ceo/order-actions`.
* Filters: `wpdevart_ceo_order_state`, `wpdevart_ceo_item_rules`, `wpdevart_ceo_window_deadline`, `wpdevart_ceo_price_in_order_currency`, `wpdevart_ceo_open_statuses`, `wpdevart_ceo_order_is_shipped`, `wpdevart_ceo_order_is_unpaid`, `wpdevart_ceo_order_is_authorized_only`, `wpdevart_ceo_locked_product_types`, `wpdevart_ceo_address_needs_request`, `wpdevart_ceo_validate_address`, `wpdevart_ceo_items_plan`, `wpdevart_ceo_gateway_can_refund`, `wpdevart_ceo_hold_order`, `wpdevart_ceo_is_visible`, `wpdevart_ceo_actions_order_id`, `wpdevart_ceo_default_settings`, `wpdevart_ceo_capability`, `wpdevart_ceo_template_file`, `wpdevart_ceo_closed_reasons`, `wpdevart_ceo_cancel_refund_lines`, `wpdevart_ceo_cancel_plan`, `wpdevart_ceo_cancel_headline`, `wpdevart_ceo_cancel_refund`, `wpdevart_ceo_cancel_args`, `wpdevart_ceo_cancelled_notice`, `wpdevart_ceo_email_body`, `wpdevart_ceo_dispatch`, `wpdevart_ceo_address_preview`, `wpdevart_ceo_address_settle`, `wpdevart_ceo_apply_paid_change`, `wpdevart_ceo_paid_swap_lines`, `wpdevart_ceo_changed_notice`.
* Actions: `wpdevart_ceo_loaded`, `wpdevart_ceo_order_cancelled`, `wpdevart_ceo_items_changed`, `wpdevart_ceo_address_changed`, `wpdevart_ceo_note_changed`, `wpdevart_ceo_item_repointed`, `wpdevart_ceo_difference_created`, `wpdevart_ceo_difference_paid`, `wpdevart_ceo_difference_expired`, `wpdevart_ceo_paid_change_applied`, `wpdevart_ceo_request_created`, `wpdevart_ceo_request_approved`, `wpdevart_ceo_request_closed`, `wpdevart_ceo_manual_refund_needed`, `wpdevart_ceo_order_released`, `wpdevart_ceo_cancel_confirm_fields`, `wpdevart_ceo_render_preview`, `wpdevart_ceo_change_page_sections`, `wpdevart_ceo_pay_box`, `wpdevart_ceo_cancel_preview_before`, `wpdevart_ceo_page_opened`, `wpdevart_ceo_requests_screen_before`.

= Credits =

* The edit, cancel, clock and check icons are from [Tabler Icons](https://tabler.io/icons), Copyright (c) 2020-2024 Paweł Kuna, MIT License.

Have questions, ideas or suggestions? [Share them with us](https://wordpress.org/support/plugin/wpdevart-cancel-edit-orders-for-woocommerce/).

== Installation ==

1. Install and activate WooCommerce.
2. Install and activate WpDevArt: Cancel & Edit Orders for WooCommerce from the Plugins screen (or upload it to `/wp-content/plugins/`).
3. Open **Cancel/Edit Orders → Settings**: choose how long customers can change or cancel, and how paid orders are cancelled. The plugin starts in test mode: only shop managers see the buttons, on their own orders. Place a test order, change and cancel it from My Account, then set "Show the Change and Cancel buttons to" to **Every customer (live)**.

== Frequently Asked Questions ==

= How long can customers change an order? =

For the time you set, from 5 minutes to 30 days (60 minutes by default), counted from the payment. Changes stop earlier when the order is completed, gets a tracking number or a shipping label, or when you close them from the order screen.

= What happens to the money? =

Customers see the result before they confirm. Fewer items, a cheaper option or a cancellation is refunded through the payment method, as a normal WooCommerce refund. More items or a dearer option create a small linked order with a pay link; the change is made once it is paid. The pay link offers only payment methods that take the money at once, not cash on delivery, bank transfer, cheque, bank debits or vouchers. Orders that are not paid yet are simply changed, with nothing to refund.

= What if my payment method can't refund automatically? =

The refund is recorded on the order, the order is flagged "Manual refund needed" in the orders list and you get an email. Once you have paid the customer back, click "I refunded it" on the order screen.

= Can guests change their orders? =

Yes, through a secure link on the thank-you page and in the order emails. The link stops working soon after the time to change or cancel ends (after 30 days for orders that are not paid yet, at the release for pre-orders). When it is opened in another browser, the guest first types the email address of the order.

= Will my warehouse pack an order before the time is over? =

Not if you turn on "Hold paid orders while changes are open". Paid orders then wait as "Open for changes" instead of Processing, and move to Processing when the time ends, when the customer clicks "All good" or when you release them.

= Can I place the buttons on a custom thank-you page? =

Yes. Use the "Change or cancel order" block, the Elementor widget or the shortcode `[wpdevart_ceo_order_actions]`. They show the order of the page (the thank-you page, the order page, or any page whose link holds the WooCommerce order key), otherwise the signed-in customer's latest order that can still be changed. Only the order's own customer sees them. For a guest order, the order key works for 10 minutes after the order, as on WooCommerce's own thank-you page; after that, only in the browser that placed the order or confirmed its email address.

= Do invoices stay correct? =

Yes. Money back is a normal WooCommerce refund and extra money is a separate order, so invoice plugins treat them like any other refund or order. With PDF Invoices & Packing Slips for WooCommerce, the invoice keeps its number, shows the new size or colour, and an extra payment gets its own invoice. That plugin keeps refunds off the invoice (they belong on a credit note, a feature of its paid version). To print refunds and the net total on the invoice, add this line to your theme's functions.php or a code snippets plugin: `add_filter( 'wpo_wcpdf_remove_refund_totals', '__return_false' );`

= Does it work with the other WpDevArt plugins? =

Yes, using only their own features:

* **Estimated Delivery Date**: after a change of address or items, the delivery estimate is worked out again from the original order time, and a note gives the new date. An estimate you set by hand is never changed.
* **Pre-Orders**: paid pre-orders get the normal time to change, and pre-ordered items are locked. After that time, customers can still cancel the whole order until the release date: as a request you approve (the default), at once with a refund, or not at all. Choose under Cancellation › Pre-orders.
* **Request a Quote**: orders from a quote keep their agreed prices, so their items can't be changed online. Address changes and cancellation still work.
* **Duplicate & Repeat Orders**: an order you prepare for a customer opens for changes once the customer has paid it.

= Is this a tool for the EU right of withdrawal? =

No. It lets customers change or cancel an order shortly after buying. It does not replace the right of withdrawal, and it never hides or replaces WooCommerce's own order withdrawal form.

= Does it work with HPOS and the Cart and Checkout blocks? =

Yes. The plugin declares compatibility with High-Performance Order Storage and with the Cart and Checkout blocks, and also works with the classic posts storage.

= Can I override the templates? =

Yes. Copy `templates/order-actions.php` or `templates/change-order.php` to `your-theme/wpdevart-cancel-edit-orders-for-woocommerce/`. The text of the emails (intro, list of changes, message and button) is `templates/emails/email-body.php`: copy it to `your-theme/wpdevart-cancel-edit-orders-for-woocommerce/emails/`. The email layouts (`wpdevart-ceo-email.php`, `plain/` and `block/`) go to `your-theme/woocommerce/emails/`.

= Does the plugin send data to external services? =

No. See the External services section.

= How do I remove all data when I delete the plugin? =

Turn on "Delete data on uninstall" under Cancel/Edit Orders → Settings → Tools. When the plugin is deleted, its settings and summary are removed. Notes and refunds on your orders always stay.

= How do I translate the plugin? =

It is translation-ready with the text domain `wpdevart-cancel-edit-orders-for-woocommerce`. Translations can be contributed on translate.wordpress.org. WPML and Polylang users can translate the button labels, messages, reasons and email texts under String Translation.

= Does the Premium version replace the free version? =

No. The Premium version is a separate add-on that extends the free plugin. Both stay installed and active.

== Screenshots ==

1. Pay Difference Page
2. Confirm Changes Page
3. Review Changes Page
4. Confirm Changes Page
5. Reports Page
6. Advanced Rules Page

== External services ==

The plugin makes no automatic requests to any external service: no tracking, no update pings and no remotely loaded assets.

Refunds for changes and cancellations are made through the payment method plugin your store already uses (for example Stripe or WooPayments), exactly as when you refund an order yourself in WooCommerce. This plugin sends nothing to those services on its own.

The only third-party destinations it links to are opened by the administrator on purpose, from the plugin's own screens, and receive nothing but the click:

* **wpdevart.com** — the "Get Premium" and Featured Themes / Featured Plugins links lead to the developer's website. [Privacy policy](https://wpdevart.com/privacy-policy/).
* **wordpress.org** — the "Get Support" link opens the plugin's support forum, and the review request links to its review form.

== Changelog ==

= 1.0.0 =

* First release.
