| @@ -44,9 +44,15 @@ | ||
| 44 | 44 | /** |
| 45 | 45 | * Initially Invoked when initialized. |
| 46 | 46 | */ |
| 47 | 47 | public function __construct() { |
| 48 | - add_action('plugins_loaded', [$this, 'plugins_loaded']); | |
| 48 | + // Runs on `init`, not `plugins_loaded`: migrate_posts() re-arms each | |
| 49 | + // notification's cron through Cron::set_cron(), and wp_schedule_event() | |
| 50 | + // -> wp_get_schedules() fires the `cron_schedules` filter, whose | |
| 51 | + // callbacks (NX Free/Pro, WooCommerce, ...) translate their interval | |
| 52 | + // labels. Doing that before `init` triggers WordPress' | |
| 53 | + // _load_textdomain_just_in_time "called too early" notice (WP 6.7+). | |
| 54 | + add_action('init', [$this, 'plugins_loaded'], 1); | |
| 49 | 55 | } |
| 50 | 56 | |
| 51 | 57 | public function plugins_loaded() { |
| 52 | 58 | // @todo check version. |