From 834f46c645f0481d29636993f05fbd7da5b4abb0 Mon Sep 17 00:00:00 2001 From: Brandon Stalnaker <33703490+BrandonStalnaker@users.noreply.github.com> Date: Fri, 7 Jun 2024 11:15:25 -0400 Subject: [PATCH] fix: Fix setVariant on Product (#207) --- .../src/main/java/com/mparticle/react/MParticleModule.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/android/src/main/java/com/mparticle/react/MParticleModule.java b/android/src/main/java/com/mparticle/react/MParticleModule.java index 0f45f15..1e322c3 100644 --- a/android/src/main/java/com/mparticle/react/MParticleModule.java +++ b/android/src/main/java/com/mparticle/react/MParticleModule.java @@ -684,6 +684,11 @@ private static Product ConvertProduct(ReadableMap map) { builder.quantity(quantity); } + if (map.hasKey("variant")) { + String variant = map.getString("variant"); + builder.variant(variant); + } + return builder.build(); }