WooCommerce - Update Customer
Description
Section titled “Description”This module allows updating the information of an existing customer, identifying them by ID or email.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
credentials_id | string | Yes | Credentials ID |
customer_id | number | Conditional | Customer ID |
email | string | Conditional | Current email (to search) |
new_email | string | No | New email |
first_name | string | No | New first name |
last_name | string | No | New last name |
billing_* | string | No | Billing fields |
shipping_* | string | No | Shipping fields |
Either customer_id OR email is required to identify the customer.
Credentials
Section titled “Credentials”| Field | Description | Example |
|---|---|---|
url | WooCommerce store base URL | https://my-store.com |
consumer_key | REST API Consumer Key | ck_xxxx... |
consumer_secret | REST API Consumer Secret | cs_xxxx... |
Output
Section titled “Output”{ "success": true, "customer": {}, "customer_id": 123, "fields_updated": ["first_name", "billing"], "message": "Customer 123 updated successfully"}Usage Example
Section titled “Usage Example”Update by ID
Section titled “Update by ID”{ "credentials_id": "woo_tienda", "customer_id": 123, "first_name": "Juan Carlos", "last_name": "Garcia Lopez"}Update by email
Section titled “Update by email”{ "credentials_id": "woo_tienda", "email": "cliente@antiguo.com", "new_email": "cliente@nuevo.com"}Update billing address
Section titled “Update billing address”{ "credentials_id": "woo_tienda", "customer_id": 456, "billing_address_1": "Nueva Calle 789", "billing_city": "Valencia", "billing_postcode": "46001"}- If you use
emailto search, the customer must exist - To change the email, use
new_email - Only the fields you specify are updated
- Addresses are updated as a block
Related Nodes
Section titled “Related Nodes”- WooGetCustomers - Get customers to then update them
- WooCreateCustomer - Create a new customer
- WooGetOrders - Get customer orders