=== WDA Duplicate & Repeat Orders for WooCommerce ===
Contributors: wpdevart
Tags: woocommerce, duplicate order, repeat order, order template, order again
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

Save WooCommerce orders as reusable templates and create repeat orders in seconds. Perfect for B2B, wholesale, and recurring purchases.

== Description ==

Do the same customers order the same products again and again? **WDA Duplicate & Repeat Orders for WooCommerce** turns any order into a reusable **order template** and creates the next order from it in a few clicks: the right customer, the right products and quantities, at **today's prices**, with a **stock check** before anything is created.

Most "duplicate order" tools copy the old order row by row, including its old prices, taxes, payment details, invoice numbers and stock markers, and send emails nobody asked for. This plugin builds a brand-new order through WooCommerce's own order API instead: prices and taxes are calculated again for the customer's address, nothing from the old payment is copied, stock is not touched and no email is sent until you move the order on in WooCommerce.

➡ **[GET PREMIUM VERSION NOW!](https://wpdevart.com/duplicate-repeat-orders-for-woocommerce)**

[GET SUPPORT](https://wordpress.org/support/plugin/wda-duplicate-repeat-orders-for-woocommerce/)

= Free version features =

* **One-click Duplicate** — Duplicate any order from the order screen, the order preview on the Orders list, WooCommerce's Order actions list or the bulk actions. The copy opens as a new Pending payment (or On hold) order, ready to review and send.
* **Duplicate and edit** — Check and change the lines before the order is created: quantities, products, variations, customer, notes.
* **Unlimited order templates** — Save any order as a template, from the order screen, the order preview or in bulk. Templates keep the products, the chosen variation attributes, the quantities, a default customer and notes.
* **Template library** — Search by template name, customer, product name or SKU; sort by use, date or name; health badges show which templates are ready and which need attention (deleted product, missing variation, not enough stock). Trash and restore included.
* **Template editor** — Add and remove products, change quantities and variations, set a default customer, a customer note and a private note.
* **Create Order screen** — Pick a template, choose the customer, adjust the lines and see live stock and price checks before the order is created.
* **New order from template** — A button next to WooCommerce's "Add order" on the Orders screen.
* **Add from template** — Add a template's products to an order you are editing, right next to WooCommerce's "Add product(s)", with a preview of what will be added.
* **Today's prices or the original prices** — Duplicates use today's prices by default; choose the original order's prices in the settings.
* **Stock validation** — Block new orders that would oversell, or allow them with a warning. Backorders and stock managed on the parent product are respected; quantity rules of other plugins are shown as warnings.
* **Guest orders** — Templates from guest orders keep the guest's billing and shipping address, so repeat orders reach the right person.
* **Traceability** — Every new order notes which template or order it came from, and the order screen links back to it.
* **Choose where the buttons show** — Hide Duplicate and Save as template for order statuses where they make no sense (for example Failed or Cancelled).
* **Quiet by design** — New orders are created without emails, payment or stock changes. WooCommerce does all of that as usual when staff move the order on.
* **HPOS compatible** — Works with WooCommerce's High-Performance Order Storage and with the legacy posts storage.
* **Privacy tools** — Personal data kept in templates is included in WordPress's personal data export and erase tools.
* **Translation-ready and multisite-aware** — Every text can be translated; settings are kept per site.
* **Developer friendly** — Public PHP function to create an order from a template, and filters and actions at every step.

= Premium version features =

* **Customer template portal** — Customers see their own templates in My Account and order them again themselves.
* **Reorder button** — A "Reorder" button on the customer's past orders, with today's prices and stock checks.
* **Reorder links in emails** — Links that let guests and customers order the same products again from an order email.
* **Scheduled orders** — Create orders from a template automatically every week, month or custom interval.
* **Bulk creation** — Create orders from one template for many customers at once.
* **Update a template from an order** — Replace a template's lines with the lines of a newer order.
* **Template versions** — See and restore earlier versions of a template.
* **Price modes** — Today's prices, the template's saved prices, or a fixed discount per template.
* **Advanced stock rules** — Per-template stock behaviour and substitutions.
* **Global product replace** — Replace a discontinued product in every template at once.
* **Repeat-order guard** — Warn before creating the same order for the same customer twice in a short time.
* **Advanced order options** — Shipping method, payment method, coupon and order status per template.
* **CSV import and export** — Move templates between stores or edit them in a spreadsheet.
* **Staff permissions** — Decide which roles may use, create or manage templates.
* **Usage reports** — See which templates are used most and how much they sell.
* **Categories and filters** — Organise large template libraries.
* **Combine templates** — Merge several templates into one order.
* **Smart suggestions** — Suggested templates from a customer's order history.
* **REST API** — Manage templates and create orders from them from other systems.

➡ **[GET PREMIUM VERSION NOW!](https://wpdevart.com/duplicate-repeat-orders-for-woocommerce)**

= Who is it for? =

* **B2B and wholesale stores** whose customers order the same assortment every week or month.
* **Phone and email orders**: staff create a customer's usual order in seconds instead of adding every product again.
* **Recurring purchases without subscriptions**: office supplies, food service, spare parts, consumables.
* **Corrected or lost orders**: duplicate a failed or cancelled order and send the customer a fresh payment link.

= Developer friendly =

* Function: `wda_dro_create_order_from_template( $template_id, $args )` returns the new `WC_Order` or a `WP_Error`.
* Filters: `wda_dro_create_order_args`, `wda_dro_pre_create_order`, `wda_dro_order_line_total`, `wda_dro_line_unit_cost`, `wda_dro_template_args`, `wda_dro_lines_from_order`, `wda_dro_template_from_order`, `wda_dro_validate_lines`, `wda_dro_order_shows_buttons`, `wda_dro_capability`, `wda_dro_default_settings`, `wda_dro_settings_sections`, `wda_dro_settings_fields`, `wda_dro_library_per_page`, `wda_dro_create_form_state`, `wda_dro_create_form_args`, `wda_dro_check_lines_response`, `wda_dro_template_editor_error`, `wda_dro_lines_price_note`
* Actions: `wda_dro_loaded`, `wda_dro_order_items_added`, `wda_dro_order_created`, `wda_dro_template_saved`, `wda_dro_template_items_added`, `wda_dro_settings_tab_content`, `wda_dro_template_editor_fields`, `wda_dro_template_fields_saved`, `wda_dro_template_duplicated`, `wda_dro_create_order_fields`, `wda_dro_line_row_fields`, `wda_dro_admin_enqueue`, `wda_dro_install`, `wda_dro_uninstall`

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

== Installation ==

1. Upload the plugin to `/wp-content/plugins/` or install it from the Plugins screen.
2. Activate it. WooCommerce must be installed and active.
3. Open any order in WooCommerce: the "Duplicate & Repeat" box offers Duplicate, Duplicate and edit and Save as template.
4. Open the new "Repeat Orders" admin menu to manage templates, create orders from them and change the settings.

== Frequently Asked Questions ==

= Does Duplicate copy the old order exactly? =

No, on purpose. It creates a new order with the same products, quantities, variations and customer, and calculates prices and taxes again. Payment data, transaction IDs, invoice numbers, dates, statuses, stock markers and notes of the old order are never copied. Shipping and fee lines, the addresses and the customer note are copied or not as you choose in the settings.

= Which prices does a new order use? =

Today's prices by default. For duplicates you can choose the original order's prices in the settings (used only when the original order was placed in the store's currency).

= Are emails sent or stock reduced when an order is created? =

No. New orders are created in Pending payment (or On hold, if you choose it) without emails, payment or stock changes. When staff move the order on, WooCommerce sends its emails and reduces stock as usual.

= What happens when a product in a template was deleted or is out of stock? =

The template shows a "Needs changes" badge and the Create Order screen lists the problem on the line. Nothing is created until every line can be ordered. With the stock rule set to "Allow", shortages are shown as warnings instead.

= Is there a limit on the number of templates? =

No. The free version has no limits on templates or orders.

= Does it work with High-Performance Order Storage (HPOS)? =

Yes. The plugin declares HPOS compatibility and works with both WooCommerce order storages.

= Who can use it? =

Store managers and administrators (the `manage_woocommerce` capability). Developers can change this per action with the `wda_dro_capability` filter.

= What happens to order lines that have no product? =

Lines that are not linked to a product in the store (for example custom lines created by an import or a till) cannot be copied. Duplicate and Save as template tell you which lines were left out, and the new order gets a private note about them.

= Does the plugin send data anywhere or track visitors? =

No. It makes no requests to external services and stores its data (templates and settings) in your own database. See the External services section.

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

Turn on "Delete data on uninstall" under Settings → Advanced. When the plugin is deleted, its templates, its settings and the references it stored on orders are removed. Orders are never deleted: orders created with the plugin stay, as they are WooCommerce orders.

= How do I translate the plugin? =

It is translation-ready with the text domain `wda-duplicate-repeat-orders-for-woocommerce`. Translations can be contributed on translate.wordpress.org.

= 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. Order templates library with search and health badges.
2. Template editor.
3. Create Order screen with stock and price checks.
4. Duplicate & Repeat box on WooCommerce's order screen.
5. Add from template in WooCommerce's order editor.
6. Settings.

== External services ==

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

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.

== Changelog ==

= 1.0.0 =

* Initial release: one-click Duplicate and Duplicate and edit, unlimited order templates with a searchable library and editor, the Create Order screen with stock and price validation, New order from template, Add from template in WooCommerce's order editor, bulk actions, order preview buttons, privacy tools and HPOS compatibility.
