plan() === 'pro'; $sdk->add_filter('deactivate_on_activation', static fn() => $ready); if ($ready) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; deactivate_plugins($legacy); // WordPress already captured this request's active-plugin list. Only the // old engine runs now; the next request starts the licensed new engine. return; } add_action('admin_notices', static function () use ($sdk): void { if (!current_user_can('manage_options')) { return; } echo '

' . esc_html__('Legacy migration is waiting for a Pro license. The existing booking plugin remains active. Activate Pro in the account page to complete the migration on the next request.', 'abece-booking') . ' ' . esc_html__('Manage license', 'abece-booking') . '

'; }); } }