Helper/Data.php
public function updateDataFields($email, $website, $storeName)
    {
        $data = [];
        if ($storeNameKey = $website->getConfig(
            \Dotdigitalgroup\Email\Helper\Config::XML_PATH_CONNECTOR_CUSTOMER_STORE_NAME
        )
        ) {
            $data[] = [
                'Key' => $storeNameKey,
                'Value' => $storeName,
            ];
        }
        if ($websiteName = $website->getConfig(
            \Dotdigitalgroup\Email\Helper\Config::XML_PATH_CONNECTOR_CUSTOMER_WEBSITE_NAME
        )
        ) {
            $data[] = [
                'Key' => $websiteName,
                'Value' => $website->getName(),
            ];
        }
        if (!empty($data)) {
            //update data fields
            if ($this->isEnabled($website)) {
                $client = $this->getWebsiteApiClient($website);
                $client->updateContactDatafieldsByEmail($email, $data);
            }
        }
    }
public function updateDataFields($email, $website, $storeName)
    {
        $data = [];
        if ($storeNameKey = $website->getConfig(
            \Dotdigitalgroup\Email\Helper\Config::XML_PATH_CONNECTOR_CUSTOMER_STORE_NAME
        )
        ) {
            $data[] = [
                'Key' => $storeNameKey,
                'Value' => $storeName,
            ];
        }
        if ($websiteName = $website->getConfig(
            \Dotdigitalgroup\Email\Helper\Config::XML_PATH_CONNECTOR_CUSTOMER_WEBSITE_NAME
        )
        ) {
            $data[] = [
                'Key' => $websiteName,
                'Value' => $website->getName(),
            ];
        }
        if (!empty($data)) {
            //update data fields
            if ($this->isEnabled($website)) {
                $client = $this->getWebsiteApiClient($website);
                $client->updateContactDatafieldsByEmail($email, $data);
            }
        }
    }
public function updateDataFields ( $ email , $ website , $ storeName ) { $ data = [ ] ; if ( $ storeNameKey = $ website -> getConfig ( \ Dotdigitalgroup \ Email \ Helper \ Config :: XML_PATH_CONNECTOR_CUSTOMER_STORE_NAME ) ) { $ data [ ] = [ 'Key' => $ storeNameKey , 'Value' => $ storeName , ] ; } if ( $ websiteName = $ website -> getConfig ( \ Dotdigitalgroup \ Email \ Helper \ Config :: XML_PATH_CONNECTOR_CUSTOMER_WEBSITE_NAME ) ) { $ data [ ] = [ 'Key' => $ websiteName , 'Value' => $ website -> getName ( ) , ] ; } if ( ! empty ( $ data ) ) { //update data fields if ( $ this -> isEnabled ( $ website ) ) { $ client = $ this -> getWebsiteApiClient ( $ website ) ; $ client -> updateContactDatafieldsByEmail ( $ email , $ data ) ; } } }
Update data fields.

@param string $email
@param \Magento\Store\Api\Data\WebsiteInterface $website
@param string $storeName

@return null
Update data fields .