From 9261ab8ad607b655418139ac34af27b011481cf2 Mon Sep 17 00:00:00 2001 From: gonzalo Date: Fri, 9 Nov 2018 17:36:40 -0300 Subject: [PATCH] remove serializer for helper --- Helper/Data.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Helper/Data.php b/Helper/Data.php index a62321ab..8ec8aa1f 100644 --- a/Helper/Data.php +++ b/Helper/Data.php @@ -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; @@ -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( @@ -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 ) { @@ -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); } @@ -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[] = [ @@ -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])) {