Skip to content

Commit

Permalink
https://github.com/thehcginstitute-com/m1/issues/590
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed May 4, 2024
1 parent cbf97a4 commit 88dab60
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -976,12 +976,6 @@ private function getUnknownMergeField($attributeCode, $customer, $attribute)
*/
private function getWebSiteByStoreId($storeId) {return Mage::getModel('core/store')->load($storeId)->getWebsiteId();}

/**
* @param $orderCollection
* @return bool
*/
private function isNotEmptyOrderCollection($orderCollection) {return $orderCollection->getSize() > 0;}

/**
* @param $mailchimpTags
* @return bool
Expand Down Expand Up @@ -1009,7 +1003,7 @@ private function order():?O {return dfc($this, function() {
$orderCollection = hcg_mc_h()->getOrderCollectionByCustomerEmail($this->getSubscriber()->getSubscriberEmail())
->setOrder('created_at', 'DESC')
->setPageSize(1);
if ($this->isNotEmptyOrderCollection($orderCollection)) {
if ($orderCollection->getSize()) {
$r = $orderCollection->getLastItem();
}
return $r;
Expand Down

0 comments on commit 88dab60

Please sign in to comment.