Actions after export
The plugin provides a dedicated action hook named woe_order_exported. This hook fires for each order that has been successfully exported – whether you run the export manually, on a schedule, or via a status‑change trigger.
Parameters
The hook passes a single argument to your callback function:
|
Parameter |
Type |
Description |
|---|---|---|
|
|
|
The numeric ID of the WooCommerce order that has just been exported. |
That $order_id is the key that unlocks the full order object, giving you access to all order data – customer details, line items, totals, custom meta fields, and more.
|
1 2 3 4 5 |
// Update order status with comment add_action('woe_order_exported', function ($order_id) { $order = new WC_Order($order_id); $order->update_status('completed', 'Exported !'); } ); |