PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.6
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.6
1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 All 49 releases
← All changes | app/Hooks/Handlers/ShortCodes/PricingTableShortCode.php +2 -6 1.3.28 → 1.6.6 View file →
@@ -67,15 +67,11 @@
67 67 return $productVariation;
68 68 });
69 69
70 70 $activeVariants = [];
71 - $getActiveVariants = explode(',', Arr::get($shortcodeAttributes, 'active_variant'));
71 + $activeVariantItems = array_filter(explode(',', Arr::get($shortcodeAttributes, 'active_variant', '')));
72 72
73 - foreach ($getActiveVariants as $item) {
74 - if (empty($item)) {
75 - continue;
76 - }
77 - // Check if the item contains an '=' sign using Str::contains()
73 + foreach ($activeVariantItems as $item) {
78 74 if (Str::contains($item, '=')) {
79 75 list($key, $value) = explode('=', $item);
80 76 $activeVariants[trim($key)] = trim($value);
81 77 }