wiki/knowledge/woocommerce/offline-order-auto-completion-plugin.md · 546 words · 2026-01-16

Offline Order Auto-Completion Plugin

Overview

WooCommerce sets offline payment methods (Check, Direct Bank Transfer, COD, etc.) to "On Hold" status by default. ShipStation only syncs orders with "Completed" status, which means offline orders never reach ShipStation without manual intervention.

The solution is a lightweight custom PHP plugin that hooks into the WooCommerce thank-you page and automatically transitions offline orders from "On Hold" (or "Pending"/"Processing") to "Completed" at the moment of order submission.

This pattern was first built and deployed for [1] B2B site in January 2026.


The Problem

Step What Happens
Customer checks out with offline payment WooCommerce sets order status → On Hold
ShipStation polls for new orders Only picks up Completed orders
Result Offline orders are invisible to ShipStation

Without intervention, Lucy (or any operator) would need to manually open each order in WooCommerce and change the status before ShipStation would see it — an unacceptable workflow at any order volume.


The Solution

A custom plugin hooks into the WooCommerce woocommerce_thankyou action (the thank-you page load, immediately after order submission). If the order's payment method is any of the configured offline types, the plugin changes the order status to Completed and logs a note.

Covered Payment Methods

Additional payment method IDs can be added to the array as needed.

What the Plugin Does

  1. Fires on the thank-you page after order placement
  2. Retrieves the order object
  3. Checks if payment_method is in the offline methods list
  4. If yes: calls $order->update_status('completed', 'Auto-completed by offline orders plugin — [payment method] payment')
  5. The status change triggers ShipStation's sync on its next poll cycle

Verification

After activation, a test order placed with Check Payments showed the following in WooCommerce order notes:

Order status changed from pending payment to on hold
Order status changed from on hold to completed — Auto-completed offline orders plugin, check payment

The order appeared in ShipStation on the next sync cycle (typically within a few minutes).


Deployment

The plugin was created as a standalone folder/file (not added to the theme's functions.php) and installed via Plugins → Add New → Upload Plugin in the WordPress admin. This keeps it isolated from theme updates and easy to deactivate or modify independently.

Plugin folder name: autocomplete-offline-orders
Activation: Standard WordPress plugin activation


Important Caveats


Sources

  1. Index|Doodla Farms
  2. Woocommerce Quickbooks Invoicing|Woocommerce–Quickbooks Invoicing
  3. B2B Checkout Customization|B2B Checkout Customization