PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.5
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.5
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 trunk All 48 releases
← All changes | app/Hooks/Handlers/ShortCodes/PricingTableShortCode.php +2 -8 1.3.21 → 1.6.5 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 }
@@ -101,11 +97,9 @@
101 97
102 98 public function render(?array $viewData = null)
103 99 {
104 100 AssetLoader::markFrontendAssetsRequired();
105 - ob_start();
106 101 (new PricingTableRenderer($viewData))->render();
107 - return ob_get_clean();
108 102 }
109 103
110 104 public function localizeData(): array
111 105 {