| @@ -25,9 +25,8 @@ | ||
| 25 | 25 | (new \FluentCart\App\Hooks\Handlers\RetentionSnapshotHandler)->register(); |
| 26 | 26 | (new \FluentCart\App\Hooks\Handlers\ReminderHandler)->register(); |
| 27 | 27 | |
| 28 | 28 | (new \FluentCart\App\Hooks\Handlers\ShortCodes\ShopAppHandler)->register(); |
| 29 | -(new \FluentCart\App\Hooks\Handlers\ExportHandler)->register(); | |
| 30 | 29 | |
| 31 | 30 | (new FluentCart\App\Hooks\Handlers\CustomCheckout\CustomCheckout())->register(); |
| 32 | 31 | |
| 33 | 32 | // Tax Module Init |
| @@ -37,8 +36,10 @@ | ||
| 37 | 36 | |
| 38 | 37 | // Turnstile Module Init |
| 39 | 38 | (new \FluentCart\App\Modules\Turnstile\TurnstileInit())->register(\FluentCart\App\App::getInstance()); |
| 40 | 39 | |
| 40 | +(new \FluentCart\App\Modules\FluentPlayer\FluentPlayerAdminAssets())->register(); | |
| 41 | + | |
| 41 | 42 | // Register Pro Gateways Promo |
| 42 | 43 | (new \FluentCart\App\Hooks\Handlers\PromoGatewaysHandler())->register(); |
| 43 | 44 | |
| 44 | 45 | // Register Addon Gateways |
| @@ -75,8 +76,9 @@ | ||
| 75 | 76 | \FluentCart\App\Hooks\Handlers\BlockEditors\Buttons\BuyNowButtonBlockEditor::register(); |
| 76 | 77 | \FluentCart\App\Hooks\Handlers\BlockEditors\Buttons\AddToCartButtonBlockEditor::register(); |
| 77 | 78 | |
| 78 | 79 | \FluentCart\App\Hooks\Handlers\BlockEditors\MiniCartBlockEditor::register(); |
| 80 | +\FluentCart\App\Hooks\Handlers\BlockEditors\Cart\CartBlockEditor::register(); | |
| 79 | 81 | \FluentCart\App\Hooks\Handlers\BlockEditors\ProductCategoriesListBlockEditor::register(); |
| 80 | 82 | \FluentCart\App\Hooks\Handlers\BlockEditors\RelatedProduct\RelatedProductBlockEditor::register(); |
| 81 | 83 | \FluentCart\App\Hooks\Handlers\ShortCodes\Buttons\DirectCheckoutShortcode::register(); |
| 82 | 84 | \FluentCart\App\Hooks\Handlers\ShortCodes\Buttons\AddToCartShortcode::register(); |
| @@ -133,13 +135,21 @@ | ||
| 133 | 135 | return; |
| 134 | 136 | } |
| 135 | 137 | |
| 136 | 138 | $order = \FluentCart\App\Models\Order::find($orderId); |
| 137 | - if (!$order || $order->payment_status !== 'paid' || !$order->getMeta('action_scheduler_id')) { | |
| 139 | + if (!$order || $order->payment_status !== 'paid') { | |
| 138 | 140 | return; |
| 139 | 141 | } |
| 140 | 142 | |
| 141 | - $order->deleteMeta('action_scheduler_id'); | |
| 143 | + // Claim the run by deleting the meta and branching on the affected-row count. | |
| 144 | + // The Action Scheduler worker and the receipt-page AJAX nudge | |
| 145 | + // (IntegrationEventListener::runOrderActionsAjax) can arrive together, so a | |
| 146 | + // read-then-delete would let both pass the guard and fire order_paid_done | |
| 147 | + // twice. A single DELETE is atomic: MySQL hands the row to exactly one | |
| 148 | + // caller, and the loser sees 0 rows and returns. | |
| 149 | + if (!$order->deleteMeta('action_scheduler_id')) { | |
| 150 | + return; | |
| 151 | + } | |
| 142 | 152 | |
| 143 | 153 | $transaction = \FluentCart\App\Models\OrderTransaction::query() |
| 144 | 154 | ->where('order_id', $order->id) |
| 145 | 155 | ->where('status', \FluentCart\App\Helpers\Status::TRANSACTION_SUCCEEDED) |
| @@ -162,9 +172,8 @@ | ||
| 162 | 172 | do_action('fluent_cart/order_paid_done', $eventData); |
| 163 | 173 | |
| 164 | 174 | }; |
| 165 | 175 | add_action('fluent_cart/order_paid_async_private_handle', $orderPaidAsyncHandler, 1, 1); |
| 166 | -add_action('fluent_cart/order_paid_ansyc_private_handle', $orderPaidAsyncHandler, 1, 1); | |
| 167 | 176 | |
| 168 | 177 | |
| 169 | 178 | // |
| 170 | 179 | //$app->addAction('fluent_cart/orders_filter_customer', function ($query, $filters) { |
| @@ -178,8 +187,9 @@ | ||
| 178 | 187 | } |
| 179 | 188 | |
| 180 | 189 | \FluentCart\App\Modules\Subscriptions\SubscriptionModule::register(); |
| 181 | 190 | \FluentCart\App\Modules\Shipping\ShippingModule::register(); |
| 191 | +\FluentCart\App\Modules\StoreManagedRenewal\RenewalModule::register(); | |
| 182 | 192 | (new \FluentCart\App\Hooks\Handlers\AttributesHandler())->register(); |
| 183 | 193 | (new \FluentCart\App\Hooks\Handlers\AdvancedVariationHandler())->register(); |
| 184 | 194 | |
| 185 | 195 | // MCP (Model Context Protocol) — operator AI tools. Ships OFF; enabled in |