| @@ -29,11 +29,19 @@ | ||
| 29 | 29 | { |
| 30 | 30 | public static function register() |
| 31 | 31 | { |
| 32 | 32 | |
| 33 | + // Late on init, deliberately. These routes do not merely register — they | |
| 34 | + // TAKE OVER the request, render a full page and die(). At the default | |
| 35 | + // priority this callback is queued at plugin-include time, so it runs | |
| 36 | + // before anything that registers on init from `fluentcart_loaded` (every | |
| 37 | + // add-on, including FluentCart Pro). A route that renders and dies before | |
| 38 | + // those listeners exist silently drops whatever they would have rendered | |
| 39 | + // — which is why the saved-payment-method picker and the save-my-card | |
| 40 | + // consent box appeared on the checkout page but never in modal checkout. | |
| 33 | 41 | add_action('init', function () { |
| 34 | 42 | self::registerRoutes(); |
| 35 | - }); | |
| 43 | + }, 99); | |
| 36 | 44 | } |
| 37 | 45 | |
| 38 | 46 | public static function renderModalCheckout() { |
| 39 | 47 | add_action('wp_footer', function () { |