Skip to content

Commit

Permalink
remove serializer for helper
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzaloebiz committed Nov 9, 2018
1 parent f5d4bff commit 9261ab8
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,6 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
* @var \Magento\Framework\Stdlib\DateTime\DateTime
*/
protected $_date;
/**
* @var \Magento\Framework\Serialize\Serializer\Json
*/
protected $_serializer;


private $customerAtt = null;
Expand Down Expand Up @@ -218,7 +214,6 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
* @param \Magento\Directory\Api\CountryInformationAcquirerInterface $countryInformation
* @param \Magento\Framework\App\ResourceConnection $resource
* @param \Ebizmarts\MailChimp\Model\MailChimpInterestGroupFactory $interestGroupFactory
* @param \Magento\Framework\Serialize\Serializer\Json $serializer
* @param \Magento\Framework\Stdlib\DateTime\DateTime $date
*/
public function __construct(
Expand Down Expand Up @@ -247,7 +242,6 @@ public function __construct(
\Magento\Directory\Api\CountryInformationAcquirerInterface $countryInformation,
\Magento\Framework\App\ResourceConnection $resource,
\Ebizmarts\MailChimp\Model\MailChimpInterestGroupFactory $interestGroupFactory,
\Magento\Framework\Serialize\Serializer\Json $serializer,
\Magento\Framework\Stdlib\DateTime\DateTime $date
) {

Expand Down Expand Up @@ -278,7 +272,6 @@ public function __construct(
$this->_customerFactory = $customerFactory;
$this->_countryInformation = $countryInformation;
$this->_interestGroupFactory = $interestGroupFactory;
$this->_serializer = $serializer;
$this->_date = $date;
parent::__construct($context);
}
Expand Down Expand Up @@ -354,7 +347,7 @@ public function getMapFields($storeId = null)
if (!$this->_mapFields) {
$customerAtt = $this->getCustomerAtts();
$data = $this->getConfigValue(self::XML_MERGEVARS, $storeId);
$data = $this->_serializer->unserialize($data);
$data = $this->unserialize($data);
if (is_array($data)) {
foreach ($data as $customerFieldId => $mailchimpName) {
$this->_mapFields[] = [
Expand Down Expand Up @@ -1025,7 +1018,7 @@ public function getSubscriberInterest($subscriberId, $storeId, $interest = null)

$interestGroup = $this->_interestGroupFactory->create();
$interestGroup->getBySubscriberIdStoreId($subscriberId, $storeId);
$groups = $this->_serializer->unserialize($interestGroup->getGroupdata());
$groups = $this->unserialize($interestGroup->getGroupdata());
if (isset($groups['group'])) {
foreach ($groups['group'] as $key => $value) {
if (isset($interest[$key])) {
Expand Down

0 comments on commit 9261ab8

Please sign in to comment.