<?php
/**
 * This file is part of the Ecommerce-Core package
 *
 * @package Ecommerce-Core
 */

/**
 * Traits namespace
 */
namespace Heystack\Ecommerce\Transaction\Traits;

/**
 * Provides an implementation for the Serializable Interface for Transaction Modifiers
 *
 * @copyright  Heyday
 * @author Glenn Bautista <glenn@heyday.co.nz>
 * @package Ecommerce-Core
 */
trait TransactionModifierSerializeTrait
{
    use TransactionModifierHasDataTrait;

    /**
     * Returns a serialized string from the data array
     * @return string
     */
    public function serialize()
    {
        return \Heystack\Core\serialize($this->getData());
    }

    /**
     * Unserializes the data into the data array
     * @param string $data
     * @return void
     */
    public function unserialize($data)
    {
        $this->setData(\Heystack\Core\unserialize($data));
    }
}

<?php
/**
 * This file is part of the Ecommerce-Core package
 *
 * @package Ecommerce-Core
 */

/**
 * Traits namespace
 */
namespace Heystack\Ecommerce\Transaction\Traits;

/**
 * Provides an implementation for the Serializable Interface for Transaction Modifiers
 *
 * @copyright  Heyday
 * @author Glenn Bautista <glenn@heyday.co.nz>
 * @package Ecommerce-Core
 */
trait TransactionModifierSerializeTrait
{
    use TransactionModifierHasDataTrait;

    /**
     * Returns a serialized string from the data array
     * @return string
     */
    public function serialize()
    {
        return serialize($this->getData());
    }

    /**
     * Unserializes the data into the data array
     * @param string $data
     * @return void
     */
    public function unserialize($data)
    {
        $this->setData(unserialize($data));
    }
}

--- 
+++ 
@@ -27,7 +27,7 @@
      */
     public function serialize()
     {
-        return serialize($this->getData());
+        return \Heystack\Core\serialize($this->getData());
     }
 
     /**
@@ -37,6 +37,6 @@
      */
     public function unserialize($data)
     {
-        $this->setData(unserialize($data));
+        $this->setData(\Heystack\Core\unserialize($data));
     }
 }
Use the new serialization api
