public function MailchimpEcommerce::updateCustomer in Mailchimp 8
Update a customer.
Parameters
string $store_id: The ID of the store.
array $customer: An associative array of customer information.
- email_address (string) The customer's email address.
- opt_in_status (boolean) The customer's opt-in status. This value will never overwrite the opt-in status of a pre-existing Mailchimp list member, but will apply to list members that are added through the e-commerce API endpoints.
bool $batch: TRUE to create a new pending batch operation.
Return value
object The API customer response object.
See also
http://developer.mailchimp.com/documentation/mailchimp/reference/ecommer...
File
- lib/
mailchimp-api-php/ src/ MailchimpEcommerce.php, line 495
Class
- MailchimpEcommerce
- Mailchimp Ecommerce library.
Namespace
MailchimpCode
public function updateCustomer($store_id, $customer, $batch = FALSE) {
$tokens = [
'store_id' => $store_id,
'customer_id' => $customer['id'],
];
return $this
->request('PATCH', '/ecommerce/stores/{store_id}/customers/{customer_id}', $tokens, $customer, $batch);
}