protected function _toHtml() { if (!Mage::helper('sailthruemail')->isHorizonEnabled()) { return ''; } return parent::_toHtml(); }
/** * This will inject the optimizely embed payload into the top of the head tag and remove it from the block stack. * If this isn't ran for some reason, the layout updates should ensure this is still rendered somewhere within * the head tag. * * I considered using an observer here, but core_block_abstract_to_html_before seems to be the only good canidate and this * feels more surgical, considering there's a fallback mechanism in place if there's a rewrite that supercedes this. * * @return string */ public function _toHtml() { $embed = $this->getChildHtml('optimizely_head'); if ($embed) { $this->unsetChild('optimizely_head'); } return $embed . parent::_toHtml(); }