basecrm-php icon indicating copy to clipboard operation
basecrm-php copied to clipboard

Shipping and billing address on contacts

Open teunovic opened this issue 4 years ago • 1 comments

The $keysToPersist on the ContactsService class lacks billing_address and shipping_address

teunovic avatar Jun 07 '21 14:06 teunovic

Workaround:

$client = new BaseCRM\Client(['accessToken' => $accessToken]);

$class = new ReflectionClass($client->contacts);
$property = $class->getProperty('keysToPersist');
$property->setAccessible(true);
$keys = $property->getValue($client->contacts);
array_push($keys, 'shipping_address', 'billing_address');
$property->setValue($keys);

teunovic avatar Jun 07 '21 15:06 teunovic