You are here

public function MailchimpEcommerce::addCustomer in Mailchimp 8

Same name in this branch
  1. 8 lib/mailchimp-api-php/src/MailchimpEcommerce.php \Mailchimp\MailchimpEcommerce::addCustomer()
  2. 8 lib/mailchimp-api-php/tests/src/MailchimpEcommerce.php \Mailchimp\Tests\MailchimpEcommerce::addCustomer()

@inheritdoc

Overrides MailchimpEcommerce::addCustomer

File

lib/mailchimp-api-php/tests/src/MailchimpEcommerce.php, line 89

Class

MailchimpEcommerce
Mailchimp Ecommerce library test cases.

Namespace

Mailchimp\Tests

Code

public function addCustomer($store_id, $customer, $batch = FALSE) {
  parent::addCustomer($store_id, $customer, $batch);
  if (!isset($this->customers[$store_id])) {
    $this->customers[$store_id] = [];
  }
  $this->customers[$store_id][$customer['id']] = (object) $customer;
}