ajax.php
3 years ago
cleared_cache_ajax.php
3 years ago
create_campaign_ajax.php
3 years ago
delete_data_ajax.php
3 years ago
export_campaigns_ajax.php
3 years ago
export_geo_ajax.php
3 years ago
export_referrers_ajax.php
3 years ago
export_views_ajax.php
3 years ago
filters_ajax.php
3 years ago
migration_status_ajax.php
3 years ago
real_time_ajax.php
3 years ago
test_email_ajax.php
3 years ago
update_capabilities_ajax.php
3 years ago
migration_status_ajax.php
28 lines
| 1 | <?php |
| 2 | |
| 3 | namespace IAWP; |
| 4 | |
| 5 | class Migration_Status_AJAX extends AJAX |
| 6 | { |
| 7 | protected function action_name(): string |
| 8 | { |
| 9 | return 'iawp_migration_status'; |
| 10 | } |
| 11 | |
| 12 | protected function allowed_during_migrations(): bool |
| 13 | { |
| 14 | return true; |
| 15 | } |
| 16 | |
| 17 | protected function action_callback(): void |
| 18 | { |
| 19 | if (!Migrations\Migration::is_actually_migrating()) { |
| 20 | Migrations\Migration::create_or_migrate(); |
| 21 | } |
| 22 | |
| 23 | wp_send_json_success([ |
| 24 | 'isMigrating' => Migrations\Migration::is_migrating(), |
| 25 | ]); |
| 26 | } |
| 27 | } |
| 28 |