=== Demfilz Auto Order Wholesale-Dropship for WooCommerce ===
Contributors: demfilz
Tags: dropshipping, wholesale, purchase order, supplier, woocommerce
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Auto-email your wholesale supplier a dropship purchase order — with the customer's address — the moment a WooCommerce order is paid.

== Description ==

**Demfilz Auto Order Wholesale-Dropship for WooCommerce** automates supplier ordering for wholesale and dropshipping stores. Add a private **cost price** to your products, store your **supplier's details**, and when an order is placed and paid the plugin automatically builds a **purchase order** and emails it to the supplier — including the customer's **drop-shipping address** — so your supplier ships straight to your customer. No more re-keying orders into a supplier's inbox.

Everything below is included and fully functional. There are no locked features, no trial period and no usage limits.

= What it does =

* Adds a **Cost price** field to every product and variation (internal only — never shown to customers).
* Stores your wholesale supplier's name, email, contact, CC addresses, phone and address.
* On a **paid order**, automatically emails the supplier a purchase order containing the customer's dropship address and your cost-price line items.
* Optional **flat shipping fee** line on the purchase order, with your own label, added to the PO total.
* **Branded purchase-order email** — add your logo, company name and details, a "Notes to supplier" message and footer terms.
* Purchase-order **log** with delivery status and one-click **resend**.
* An order-screen panel and an Orders-list **bulk action** to send or re-send supplier orders.

Built to the WordPress Coding Standards and compatible with WooCommerce High-Performance Order Storage (HPOS) and the cart/checkout blocks.

= Third-party services =

This plugin does not connect to any external service. Purchase orders are sent using your own site's email (`wp_mail()`).

This plugin is not affiliated with, or endorsed by, WooCommerce or Automattic. "WooCommerce" and "Woo" are trademarks of their respective owners and are used here only to describe compatibility.

== Installation ==

1. Upload the plugin via Plugins → Add New → Upload Plugin, then activate it (WooCommerce must be installed and active).
2. Edit your products and set a **Cost price** on the General tab (or per variation).
3. Go to **Auto Order → Supplier** and enter your supplier's name and email.
4. Review **Auto Order → PO Settings** (sender, PO number format, optional flat shipping fee and branding). Purchase orders are sent on paid orders by default.
5. Place a test order and pay — your supplier receives the purchase order automatically.

== Frequently Asked Questions ==

= Will customers ever see the cost price? =
No. It is private purchasing data, never enqueued or printed on the storefront. It appears only on the supplier purchase order and your own admin screens.

= When is the supplier emailed? =
When the order is marked paid (payment complete / processing / completed). The plugin guards against duplicates, so a supplier is never emailed twice for the same order unless you click Resend.

= Does the plugin send data anywhere? =
No. It makes no external connections. Purchase orders are emailed from your own site using `wp_mail()`.

= Does it work with my theme and checkout? =
Yes. It hooks into WooCommerce order events, so it works with the classic and block checkout and is HPOS-compatible.

= Does it work with variable products? =
Yes. Set a cost price on each variation and the correct variation cost appears on the purchase order.

== Screenshots ==

1. Cost price field on the product data panel.
2. Supplier configuration page.
3. Purchase-order settings, including the flat shipping fee and branding.
4. The purchase-order log with delivery status and resend.

== Changelog ==

= 1.0.2 =
* Streamlined the single-supplier purchase-order workflow.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.2 =
Streamlined the single-supplier purchase-order workflow.
