From ba60695641df54b31960b6154897bb8a68139d82 Mon Sep 17 00:00:00 2001 From: Martijn de Boer Date: Wed, 15 Jun 2022 11:28:26 +0200 Subject: [PATCH] metadata, referral, loyalty should be cast as object --- src/CustomEvents.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CustomEvents.php b/src/CustomEvents.php index 2c7d9d9..99b40e7 100644 --- a/src/CustomEvents.php +++ b/src/CustomEvents.php @@ -37,15 +37,15 @@ public function track($event, $customer, $metadata = null, $referral = null, $lo ]; if ($metadata) { - $params['metadata'] = $metadata; + $params['metadata'] = (object)$metadata; } if ($referral) { - $params['referral'] = $referral; + $params['referral'] = (object)$referral; } if ($loyalty) { - $params['loyalty'] = $loyalty; + $params['loyalty'] = (object)$loyalty; } return $this->client->post("/events", $params);