Skip to content

WooCommerce - Update Customer

This module allows updating the information of an existing customer, identifying them by ID or email.

FieldTypeRequiredDescription
credentials_idstringYesCredentials ID
customer_idnumberConditionalCustomer ID
emailstringConditionalCurrent email (to search)
new_emailstringNoNew email
first_namestringNoNew first name
last_namestringNoNew last name
billing_*stringNoBilling fields
shipping_*stringNoShipping fields

Either customer_id OR email is required to identify the customer.

FieldDescriptionExample
urlWooCommerce store base URLhttps://my-store.com
consumer_keyREST API Consumer Keyck_xxxx...
consumer_secretREST API Consumer Secretcs_xxxx...
{
"success": true,
"customer": {},
"customer_id": 123,
"fields_updated": ["first_name", "billing"],
"message": "Customer 123 updated successfully"
}
{
"credentials_id": "woo_tienda",
"customer_id": 123,
"first_name": "Juan Carlos",
"last_name": "Garcia Lopez"
}
{
"credentials_id": "woo_tienda",
"email": "cliente@antiguo.com",
"new_email": "cliente@nuevo.com"
}
{
"credentials_id": "woo_tienda",
"customer_id": 456,
"billing_address_1": "Nueva Calle 789",
"billing_city": "Valencia",
"billing_postcode": "46001"
}
  • If you use email to 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
  • WooGetCustomers - Get customers to then update them
  • WooCreateCustomer - Create a new customer
  • WooGetOrders - Get customer orders