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/ShopAppHandler.php +10 -1 1.6.1 → 1.6.6 View file →
@@ -10,8 +10,9 @@
10 10 use FluentCart\App\Helpers\Helper;
11 11 //use FluentCart\App\Hooks\Handlers\ShortCodes\Buttons\AddToCartShortcode;
12 12 use FluentCart\App\Models\ProductDetail;
13 13 use FluentCart\App\Modules\Templating\AssetLoader;
14 +use FluentCart\App\Services\Renderer\RenderContext;
14 15 use FluentCart\App\Services\Renderer\ShopAppRenderer;
15 16 use FluentCart\App\Services\TemplateService;
16 17 use FluentCart\App\Vite;
17 18 use FluentCart\Framework\Support\Arr;
@@ -44,9 +45,17 @@
44 45 $this->enqueueStyles();
45 46 }
46 47 }, 5);
47 48 add_shortcode(static::SHORT_CODE, function ($shortcodeAttributes, $content, $block) {
48 - return $this->handelShortcodeCall($shortcodeAttributes);
49 + // The shop shortcode registers its own closure rather than going
50 + // through ShortCode::register(), so it declares itself separately.
51 + return RenderContext::declaring(
52 + RenderContext::SOURCE_SHORTCODE,
53 + static::SHORT_CODE,
54 + function () use ($shortcodeAttributes) {
55 + return $this->handelShortcodeCall($shortcodeAttributes);
56 + }
57 + );
49 58 });
50 59 }
51 60
52 61 public function handelShortcodeCall($shortcodeAttributes)