=== WSE ACS Sync for WooCommerce === Contributors: advatix Tags: woocommerce, shipping, fulfillment, oms, order management Requires at least: 5.8 Tested up to: 7.0 Requires PHP: 7.4 Stable tag: 2.0.9 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Connect WooCommerce to ACS for order fulfillment, shipment tracking and inventory synchronisation. == Description == WSE ACS Sync for WooCommerce connects your WooCommerce store to the Advatix Order Management System (ACS) so orders flow to your fulfillment operation automatically and shipment updates flow back to your store. **Store to ACS** * Orders are sent to ACS when they reach the Processing status (not configurable). * Cancelled WooCommerce orders are cancelled in ACS. * Optional tag filter: only sync orders carrying a required tag. * Weship tags on an order drive fulfillment options: `IcePack`, `shipdate-YYYYMMDD`, `customerdob-YYYYMMDD`, `insurance-`, subscription plan tags, and ship-method tags — see the static reference tables below. * Optional order delay: queue orders and let the retry scheduler send them, on a configurable interval (5, 10, 15, 20, 25, 30, 45 or 60 minutes). * Automatic retry of failed syncs (up to 5 attempts) plus a manual "Sync Order" / "Cancel Order" action on the plugin's Orders page. * Orders are automatically (re)sent to ACS when their shipping/billing address, Weship tags, or line items are edited while still Processing — including orders that already failed all 5 attempts, since the edit may be exactly what fixes it. Nothing is resent if the edit didn't actually change what would be sent. * Optional ACS 800 Program (CCP) mode: routes orders through the CCP order feed instead, which returns a shipping label and packing slip URL for each order. * Saving the Settings tab verifies your Base URL / API Key / Account ID against ACS and registers (or updates) this store's channel there. A failed verification discards the save and shows an error instead of silently storing unverified credentials. **Orders and Print Jobs pages** The plugin adds a top-level "WSE ACS Sync for WooCommerce" admin menu (not nested under WooCommerce) with dedicated Orders and Print Jobs pages: * Orders: search, sort and paginate orders, see sync/cancel status and weather hold at a glance, view the raw API log for any order, manually sync or cancel an order, and open the shipping label / packing slip / tracking link when the 800 Program returned one. * Print Jobs: select orders on the Orders page and create a bulk "Print Shipping Labels" or "Print Packing Slips" job, which merges the individual PDFs into a single downloadable file (requires `composer install` in the plugin directory — see Installation). **Settings page tabs** * Settings: API connection, tag filter, order delay, retry scheduler and 800 Program (CCP) configuration. * Ship Methods: static reference table of order tag → ACS ship method codes (e.g. `UPS_Ground` → `UPS`, `FedEx_2Day` → `FEX`). Not configurable. * Order / CCP Tags: static reference tables of the fulfillment and 800 Program order tags (ice pack, customer DOB, insurance, subscription plan, product type, etc). Not configurable. * Inbound Webhooks: the REST URLs to give to your Advatix onboarding contact. * Logs: recent outbound/inbound API activity. **ACS to Store** Secure REST endpoints (authenticated with your API key and account ID) receive updates from ACS: * Shipment/status updates: order is marked completed and the carrier, tracking number and tracking URL are stored on the order and shared with the customer as an order note. * Inventory updates: stock levels are reset by SKU. * Weather hold notifications: recorded on the order with an order note. * Paginated product list (`GET /products`): lets ACS pull your catalog using the same ApiKey/AccountId headers, instead of separate WooCommerce REST API keys. **For developers** * `weship_acs_sync_order_payload` — filter the outbound (standard feed) order payload. * `weship_acs_sync_ccp_order_payload` — filter the outbound 800 Program (CCP) order payload. * `weship_acs_sync_ccp_order_item` — filter a single CCP order line item (product type, alcohol %, bottle size, weight). * `weship_acs_sync_order_tags` — supply order tags programmatically. * `weship_acs_sync_find_order` — resolve custom order numbers (e.g. sequential order number plugins). This plugin communicates with the ACS API service configured in the plugin settings. Order, customer and product data required for fulfillment (names, addresses, emails, phone numbers, SKUs, quantities, prices) is transmitted to that service. See Advatix's privacy policy at https://xpdel.com/privacy-policy.html. == Installation == 1. Upload the plugin files to `/wp-content/plugins/weship-acs-sync-for-woocommerce`, or install through the WordPress plugins screen. 2. If you plan to use the Print Jobs feature, run `composer install` inside the plugin directory to fetch the PDF-merge libraries (setasign/fpdi and setasign/fpdf). This is optional — the rest of the plugin works without it. 3. Activate the plugin through the 'Plugins' screen. 4. Go to the "WSE ACS Sync for WooCommerce" admin menu and enter your ACS Base URL, API Key and Account/Client ID. These must already be live/valid — saving verifies them against ACS and registers this store's channel there, and the save is rejected if verification fails. 5. If your account uses the 800 Program (CCP), enable it under "800 Program (CCP)" in Settings and fill in the Client Code and Client Facility Code. 6. Give the inbound webhook URLs shown on the settings page to your Advatix onboarding contact. == Frequently Asked Questions == = Does this plugin require WooCommerce? = Yes. WooCommerce 6.0 or newer must be installed and active. = Is HPOS (High-Performance Order Storage) supported? = Yes, the plugin declares HPOS compatibility and works with both legacy and HPOS order storage. = Where do order tags come from? = WooCommerce has no native order tags, so Weship tags are stored in the `_weship_acs_sync_tags` order meta (editable in the order sidebar) or supplied via the `weship_acs_sync_order_tags` filter. = What data is sent to ACS? = Only what is needed to fulfill the order: recipient and billing name/address/email/phone, order number, items (SKU, quantity, price), shipping notes and Weship tags. = What is the 800 Program (CCP)? = It's an alternate ACS order feed (`/order/v2/process_order`) used by some accounts instead of the standard order feed. Unlike the standard feed, its response can include a shipping label and packing slip URL for the order, which the Orders and Print Jobs pages can then use. = Why does Print Jobs say the PDF merge library is missing? = The Print Jobs feature merges PDFs with the `setasign/fpdi` and `setasign/fpdf` Composer packages, which aren't bundled with the plugin. Run `composer install` inside the plugin directory to install them. == Changelog == = 2.0.8 = * Renamed the plugin from "Weship ACS Sync for WooCommerce" to "WSE ACS Sync for WooCommerce" (display name only). The plugin folder/slug, text domain, class prefixes, function/constant prefixes, option keys, database tables, and REST namespace are unchanged, consistent with the 2.0.4 rename. = 2.0.6 = * Moved every admin-screen `