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.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/Modules/Templating/AssetLoader.php +21 -3 1.4.0 → 1.6.5 View file →
@@ -342,15 +342,23 @@
342 342 Vite::enqueueStyle('fluentcart-customer-css',
343 343 'public/customer-profile/style/customer-profile.scss'
344 344 );
345 345
346 + // wp-i18n: this bundle pulls in the admin translator transitively
347 + // (Start.js -> @/Bits/common.js -> @/utils/translator/Translator.js),
348 + // which resolves strings through window.wp.i18n.
346 349 Vite::enqueueScript(
347 350 'fluentcart-customer-js',
348 351 'public/customer-profile/Start.js',
349 - []
352 + ['wp-i18n']
350 353 )->with(CustomerProfileHandler::getLocalizationData());
351 354
352 - //will add script here/ skipping for now
355 + /**
356 + * Enqueue additional customer-dashboard assets — the hook an add-on
357 + * uses to ship the JS backing a portal section it registers through
358 + * `fluent_cart/customer_portal/profile_sections`.
359 + */
360 + do_action('fluent_cart/customer_dashboard/enqueue_assets');
353 361 }
354 362
355 363 public static function loadCartAssets()
356 364 {
@@ -416,9 +424,10 @@
416 424 'cart_item_count' => $isInstantCheckout ? 0 : ($cart ? count($cart->cart_data ?? []) : 0),
417 425 'cart_total_quantity' => $isInstantCheckout ? 0 : ($cart ? array_sum(array_map(function ($item) { return (int) ($item['quantity'] ?? 1); }, $cart->cart_data ?? [])) : 0),
418 426 ],
419 427 'fluentcart_utm_vars' => [
420 - 'allowed_keys' => UtmHelper::allowedUtmParameterKey()
428 + 'allowed_keys' => UtmHelper::allowedUtmParameterKey(),
429 + 'internal_domains' => UtmHelper::getInternalDomains()
421 430 ]
422 431 ]);
423 432
424 433 Vite::enqueueStyle(
@@ -513,8 +522,16 @@
513 522 if ($hasInstantCheckout || $hasModalCheckout) {
514 523 $isInstantCheckout = 'yes';
515 524 }
516 525
526 + $checkoutErrorNotices = Arr::get($cart->checkout_data, '__checkout_error_notices', []);
527 + if ($checkoutErrorNotices) {
528 + $checkoutData = is_array($cart->checkout_data) ? $cart->checkout_data : [];
529 + unset($checkoutData['__checkout_error_notices']);
530 + $cart->checkout_data = $checkoutData;
531 + $cart->save();
532 + }
533 +
517 534 $data = [
518 535 'fluentcart_checkout_vars' => [
519 536 'rest' => Helper::getRestInfo(),
520 537 'ajaxurl' => admin_url('admin-ajax.php'),
@@ -520,8 +537,9 @@
520 537 'ajaxurl' => admin_url('admin-ajax.php'),
521 538 'is_all_digital' => !$cart->requireShipping(),
522 539 'is_cart_locked' => $cart->checkout_data['is_locked'] ?? 'no',
523 540 'disable_coupons' => $cart->checkout_data['disable_coupons'] ?? 'no',
541 + 'notices' => array_values($checkoutErrorNotices),
524 542 'payment_methods_with_custom_checkout_buttons' => apply_filters('fluent_cart/payment_methods_with_custom_checkout_buttons', []),
525 543 'tax_settings' => (new TaxModule())->getSettings(),
526 544 'submit_button' => [
527 545 'text' => __('Place Order', 'fluent-cart'),