Skip to content

Commit

Permalink
select only necessary fields for customers #1391 for magento 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzaloebiz committed May 19, 2022
1 parent 2de85e6 commit 5c0edf3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Model/Api/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public function sendCustomers($storeId)
$listId = $this->_helper->getConfigValue(\Ebizmarts\MailChimp\Helper\Data::XML_PATH_LIST, $storeId);
$collection = $this->_collection->create();
$collection->addFieldToFilter('store_id', ['eq'=>$storeId]);
$collection->getSelect()->reset(\Zend_Db_Select::COLUMNS)->columns(['entity_id','store_id']);
$collection->getSelect()->joinLeft(
['m4m' => $this->_helper->getTableName('mailchimp_sync_ecommerce')],
"m4m.related_id = e.entity_id and m4m.type = '".\Ebizmarts\MailChimp\Helper\Data::IS_CUSTOMER.
Expand Down

0 comments on commit 5c0edf3

Please sign in to comment.