Skip to content

Commit

Permalink
https://github.com/thehcginstitute-com/m1/issues/580
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Aug 31, 2024
1 parent 4dccd96 commit c92d0fd
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app/code/community/Ebizmarts/MailChimp/Model/Observer.php
Original file line number Diff line number Diff line change
Expand Up @@ -531,25 +531,24 @@ protected function _getLandingCookie()
* 1) "Refactor the `Ebizmarts_MailChimp` module": https://github.com/cabinetsbay/site/issues/524
* 2) "Improve the «Yaay! Recovered by Mailchimp's campaign» block of the backend order screen":
* https://github.com/thehcginstitute-com/m1/issues/668
* @return Varien_Event_Observer
*/
function addOrderViewMonkey(Varien_Event_Observer $observer) {
$block = $observer->getBlock();
function addOrderViewMonkey(Ob $ob):Ob {
$block = $ob->getBlock();
if (($block->getNameInLayout() == 'order_info') && ($child = $block->getChild('mailchimp.order.info.monkey.block'))) {
$order = $block->getOrder();
$storeId = $order->getStoreId();
$helper = $this->makeHelper();
$ecommEnabled = $helper->isEcomSyncDataEnabled($storeId);
if ($ecommEnabled) {
$transport = $observer->getTransport();
$transport = $ob->getTransport();
if ($transport) {
$html = $transport->getHtml();
$html .= $child->toHtml();
$transport->setHtml($html);
}
}
}
return $observer;
return $ob;
}

/**
Expand Down

0 comments on commit c92d0fd

Please sign in to comment.