* @copyright 2022 ECSoft * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of ECSoft */ class EcsGtmProEcommerce { public function __construct($datalayer, $currencyCode = null) { if ($datalayer->getManager()->isEE()) { $this->currencyCode = $currencyCode; } if ($datalayer->getManager()->isGA4()) { $this->currency = $currencyCode; } } public function mergeObject($object) { if (is_object($object)) { $attributes = get_object_vars($object); foreach ($attributes as $attribute => $value) { $this->$attribute = $value; } } } }