Skip to content

WooCommerce - Update Order

This module allows updating the status of an order, adding notes, modifying addresses, and adding tracking information.

FieldTypeRequiredDescription
credentials_idstringYesCredentials ID
order_idnumberYesOrder ID
statusstringNoNew status
customer_notestringNoCustomer-visible note
add_notestringNoInternal order note
note_to_customerbooleanNoSend note to customer
tracking_numberstringNoTracking number
tracking_providerstringNoShipping company
tracking_urlstringNoTracking URL
billing_*stringNoBilling fields
shipping_*stringNoShipping fields
transaction_idstringNoPayment transaction ID
FieldDescriptionExample
urlWooCommerce store base URLhttps://my-store.com
consumer_keyREST API Consumer Keyck_xxxx...
consumer_secretREST API Consumer Secretcs_xxxx...
ValueDescriptionTypical transition
pendingPending payment-> processing
processingProcessing-> completed
on-holdOn hold-> processing
completedCompletedFinal
cancelledCancelledFinal
refundedRefundedFinal
failedFailed-> pending
{
"success": true,
"order": {},
"order_id": 1234,
"fields_updated": ["status", "tracking"],
"note_added": {},
"message": "Order 1234 updated successfully"
}
{
"credentials_id": "woo_tienda",
"order_id": 1234,
"status": "completed",
"tracking_number": "1Z999AA10123456784",
"tracking_provider": "UPS",
"tracking_url": "https://www.ups.com/track?tracknum=1Z999AA10123456784"
}
{
"credentials_id": "woo_tienda",
"order_id": 1234,
"add_note": "Customer contacted by phone. Confirms shipping address."
}
{
"credentials_id": "woo_tienda",
"order_id": 1234,
"status": "cancelled",
"add_note": "Cancelled at customer request"
}
  • Changing to completed sends a completion email to the customer
  • Changing to cancelled does not automatically refund
  • Notes with note_to_customer: true send email
  • Tracking is saved as order meta data
  • Some statuses do not allow direct transition (e.g., from completed to processing)
  • WooGetOrders - Get orders to then update them
  • WooGetCustomers - Get order customer data
  • WooUpdateProduct - Update order product stock