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/BlockEditors/PricingTableBlockEditor.php +18 -17 1.3.21 → 1.6.6 View file →
@@ -28,9 +28,12 @@
28 28 }
29 29
30 30 public function getStyles(): array
31 31 {
32 - return ['admin/BlockEditor/PricingTable/style/pricing-table-block-editor.scss'];
32 + return [
33 + 'admin/BlockEditor/PricingTable/style/pricing-table-block-editor.scss',
34 + 'admin/BlockEditor/Components/style/fct-global-block-editor.scss'
35 + ];
33 36 }
34 37
35 38 public function localizeData(): array
36 39 {
@@ -94,24 +97,22 @@
94 97
95 98
96 99 $activeTab = Arr::get($shortCodeAttribute, 'active_tab', 0);
97 100
98 - $code = "[" . PricingTableShortCode::SHORT_CODE .
99 - " variant_ids='{$variantIds}'" .
100 - " show_cart_button='{$showCartButton}'" .
101 - " show_checkout_button='{$showCheckoutButton}'" .
102 - " group_by='{$groupBy}'" .
103 - " active_tab='{$activeTab}'" .
104 - " active_variant='{$activeVariantString}'" .
105 - " badge='{$badgeString}'" .
106 - " colors='{$allColorStrings}'" .
107 - " product_per_row='{$productPerRow}'" .
108 - " button_options='{$buttonOptionStrings}'" .
109 - " url_params='$checkoutButtonUrlParams'".
110 - " icon_visibility='{$iconVisibility}'" .
111 - " ]";
112 -
113 - return $code;
101 + return PricingTableShortCode::make([
102 + 'variant_ids' => $variantIds,
103 + 'show_cart_button' => (string) $showCartButton,
104 + 'show_checkout_button' => (string) $showCheckoutButton,
105 + 'group_by' => $groupBy,
106 + 'active_tab' => $activeTab,
107 + 'active_variant' => $activeVariantString,
108 + 'badge' => $badgeString,
109 + 'colors' => $allColorStrings,
110 + 'product_per_row' => $productPerRow,
111 + 'button_options' => $buttonOptionStrings,
112 + 'url_params' => $checkoutButtonUrlParams,
113 + 'icon_visibility' => (string) $iconVisibility,
114 + ])->renderShortcode($block);
114 115 }
115 116
116 117 private function assocArrayToString(array $array, string $delimiter = ', '): string
117 118 {