| @@ -19,8 +19,10 @@ | ||
| 19 | 19 | use FluentCart\App\Models\AttributeTerm; |
| 20 | 20 | use FluentCart\App\Models\AttributeGroup; |
| 21 | 21 | use FluentCart\App\Models\ShippingMethod; |
| 22 | 22 | use FluentCart\App\Modules\Tax\TaxModule; |
| 23 | +use FluentCart\App\Modules\FluentPlayer\FluentPlayerBridge; | |
| 24 | +use FluentCart\App\Modules\AdminFooter\AdminFooter; | |
| 23 | 25 | use FluentCart\App\Helpers\CurrenciesHelper; |
| 24 | 26 | use FluentCart\App\Services\Filter\TaxFilter; |
| 25 | 27 | use FluentCart\App\Services\Filter\OrderFilter; |
| 26 | 28 | use FluentCart\App\Services\Filter\LicenseFilter; |
| @@ -29,11 +31,13 @@ | ||
| 29 | 31 | use FluentCart\App\Services\Filter\CustomerFilter; |
| 30 | 32 | use FluentCart\App\Services\Filter\CouponFilter; |
| 31 | 33 | use FluentCart\App\Services\Filter\LogFilter; |
| 32 | 34 | use FluentCart\App\Services\Filter\OrderBumpFilter; |
| 35 | +use FluentCart\App\Services\Filter\ReviewFilter; | |
| 33 | 36 | use FluentCart\App\Modules\Shipping\Services\Filter\ShippingClassFilter; |
| 34 | 37 | use FluentCart\App\Modules\Shipping\Services\Filter\ShippingZoneFilter; |
| 35 | 38 | use FluentCart\App\Modules\Integrations\AddOnModule; |
| 39 | +use FluentCart\App\Services\DateTime\DayjsFormatter; | |
| 36 | 40 | use FluentCart\App\Services\Translations\TransStrings; |
| 37 | 41 | use FluentCart\App\Services\Permission\PermissionManager; |
| 38 | 42 | use FluentCart\Database\DataBackfills; |
| 39 | 43 | use FluentCart\App\Modules\PaymentMethods\Core\GatewayManager; |
| @@ -49,8 +53,9 @@ | ||
| 49 | 53 | |
| 50 | 54 | if ($page == 'fluent-cart') { |
| 51 | 55 | |
| 52 | 56 | \FluentCart\App\Events\FirstTimePluginActivation::handle(); |
| 57 | + (new AdminFooter())->register(); | |
| 53 | 58 | add_action('admin_enqueue_scripts', function () { |
| 54 | 59 | Vite::enqueueStyle('fluent_cart_admin_app_css', |
| 55 | 60 | 'styles/tailwind/style.css', |
| 56 | 61 | ); |
| @@ -84,8 +89,9 @@ | ||
| 84 | 89 | $targetKeys = [ |
| 85 | 90 | 'checkout_page_id' => __('Checkout Page', 'fluent-cart'), |
| 86 | 91 | 'cart_page_id' => __('Cart Page', 'fluent-cart'), |
| 87 | 92 | 'receipt_page_id' => __('Receipt Page', 'fluent-cart'), |
| 93 | + 'order_review_page_id' => __('Order Review Page', 'fluent-cart'), | |
| 88 | 94 | 'shop_page_id' => __('Shop Page', 'fluent-cart'), |
| 89 | 95 | 'customer_profile_page_id' => __('Customer Profile Page', 'fluent-cart'), |
| 90 | 96 | ]; |
| 91 | 97 | |
| @@ -182,8 +188,22 @@ | ||
| 182 | 188 | { |
| 183 | 189 | |
| 184 | 190 | add_action('admin_menu', array($this, 'addAdminMenu')); |
| 185 | 191 | |
| 192 | + // The "↳" children under Products stay visible on every page so the | |
| 193 | + // sidebar never changes shape. Pro's "↳ Inventory" still hides itself | |
| 194 | + // with inline CSS (it relied on the admin app to reveal it), so keep | |
| 195 | + // that row visible whichever Pro version is installed. | |
| 196 | + add_action('admin_enqueue_scripts', function () { | |
| 197 | + wp_register_style('fluent-cart-admin-submenu', false); | |
| 198 | + wp_enqueue_style('fluent-cart-admin-submenu'); | |
| 199 | + wp_add_inline_style('fluent-cart-admin-submenu', ' | |
| 200 | + #adminmenu .toplevel_page_fluent-cart li.fluent_cart_inventory { | |
| 201 | + display: list-item; | |
| 202 | + } | |
| 203 | + '); | |
| 204 | + }); | |
| 205 | + | |
| 186 | 206 | /* |
| 187 | 207 | * Disable Gutenberg for Products |
| 188 | 208 | */ |
| 189 | 209 | add_filter('parent_file', function ($parent_file) { |
| @@ -476,8 +496,9 @@ | ||
| 476 | 496 | 'product_filter_options' => ProductFilter::getTableFilterOptions(), |
| 477 | 497 | 'license_filter_options' => LicenseFilter::getTableFilterOptions(), |
| 478 | 498 | 'license_site_filter_options' => LicenseSiteFilter::getTableFilterOptions(), |
| 479 | 499 | 'tax_filter_options' => TaxFilter::getTableFilterOptions(), |
| 500 | + 'review_filter_options' => ReviewFilter::getTableFilterOptions(), | |
| 480 | 501 | ]; |
| 481 | 502 | $filterOptions = apply_filters('fluent_cart/admin_filter_options', $filterOptions, []); |
| 482 | 503 | |
| 483 | 504 | // Structured table config keyed by table name (used by Table.js base class) |
| @@ -489,8 +510,9 @@ | ||
| 489 | 510 | 'license_sites' => ['filters' => Arr::get($filterOptions, 'license_site_filter_options', [])], |
| 490 | 511 | 'taxes_table' => ['filters' => Arr::get($filterOptions, 'tax_filter_options', [])], |
| 491 | 512 | 'subscriptions' => ['filters' => Arr::get($filterOptions, 'subscription_filter_options', [])], |
| 492 | 513 | 'shipping_zone_table' => ['filters' => Arr::get($filterOptions, 'shipping_zone_filter_options', [])], |
| 514 | + 'review_table' => ['filters' => Arr::get($filterOptions, 'review_filter_options', [])], | |
| 493 | 515 | // The Order Sources report filters orders, so its advanced-filter UI |
| 494 | 516 | // reuses the Orders filter vocabulary rather than defining its own. |
| 495 | 517 | 'source_report' => ['filters' => Arr::get($filterOptions, 'order_filter_options', [])], |
| 496 | 518 | ]; |
| @@ -523,8 +545,9 @@ | ||
| 523 | 545 | $appConfig['version'] = FLUENTCART_VERSION; |
| 524 | 546 | $appConfig['permissions'] = PermissionManager::getUserPermissions(); |
| 525 | 547 | $appConfig['isProActive'] = App::isProActive(); |
| 526 | 548 | $appConfig['proVersion'] = defined('FLUENTCART_PRO_PLUGIN_VERSION') ? FLUENTCART_PRO_PLUGIN_VERSION : null; |
| 549 | + $appConfig['fluentPlayer'] = FluentPlayerBridge::adminAppConfig(); | |
| 527 | 550 | |
| 528 | 551 | $appConfig['logos'] = [ |
| 529 | 552 | 'dark' => Vite::getAssetUrl('images/logo/logo-full-dark.svg'), |
| 530 | 553 | 'light' => Vite::getAssetUrl('images/logo/logo-full.svg'), |
| @@ -587,8 +610,9 @@ | ||
| 587 | 610 | 'is_tax_enabled' => TaxModule::isTaxEnabled(), |
| 588 | 611 | 'eu_vat_county_options' => TaxModule::euVatCountyOptions(), |
| 589 | 612 | 'country_tax_titles' => TaxModule::taxTitleLists(), |
| 590 | 613 | 'site_url' => site_url(), |
| 614 | + 'store_logo' => (new \FluentCart\Api\StoreSettings())->get('store_logo.url', ''), | |
| 591 | 615 | 'modules_settings' => ModuleSettings::getAllSettings(), |
| 592 | 616 | 'purchase_fluent_cart_link' => 'https://fluentcart.com/', |
| 593 | 617 | 'admin_notices' => apply_filters('fluent_cart/admin_notices', []), |
| 594 | 618 | // POSTs data-backfills/run until done; endpoint requires manage_options |
| @@ -594,9 +618,9 @@ | ||
| 594 | 618 | // POSTs data-backfills/run until done; endpoint requires manage_options |
| 595 | 619 | 'has_data_migrations' => $hasDataMigrations, |
| 596 | 620 | 'subscription_intervals' => Helper::getAvailableSubscriptionIntervalOptions(), |
| 597 | 621 | |
| 598 | - 'datei18' => TransStrings::dateTimeStrings(), | |
| 622 | + 'datei18' => DayjsFormatter::localizedStrings(), | |
| 599 | 623 | 'el_strings' => TransStrings::elStrings(), |
| 600 | 624 | 'wp_locale' => get_locale(), |
| 601 | 625 | 'is_full_name_required' => CheckoutFieldsSchema::isFullNameRequired(), |
| 602 | 626 | 'business_details' => [ |