Skip to content

Commit 4a4db6f

Browse files
authored
Update AddDataToCustomerSection.php
When you add gtm data on the section data with another plugin, this function overrides the gtm data. With a recursive function this will be added next to existing data.
1 parent 3c7cdac commit 4a4db6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Plugin/AddDataToCustomerSection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function afterGetSectionData(CustomerData $subject, $result)
6767
$gtmOnce = $this->customerSessionDataProvider->get();
6868
$this->customerSessionDataProvider->clear();
6969

70-
return array_merge($result, ['gtm' => $gtmData, 'gtm_events' => $gtmOnce]);
70+
return array_merge_recursive($result, ['gtm' => $gtmData, 'gtm_events' => $gtmOnce]);
7171
}
7272

7373
/**

0 commit comments

Comments
 (0)