# wpsynchro/trunk/src/API/Status.php

WP Synchro – The Ultimate WordPress Migration Tool, version trunk. 44 lines.

- Page: https://pluginprobe.com/plugins/wpsynchro/trunk/code/src/API/Status.php
- Raw: https://pluginprobe.com/plugins/wpsynchro/trunk/raw/src/API/Status.php
- Modified: 2026-09-04T12:18:00+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wpsynchro/trunk/code/src/API/Status.php#L10-L20`.

```php
<?php

namespace WPSynchro\API;

use WPSynchro\Status\MigrateStatus;

/**
 * Class for handling service "status"
 * Call should already be verified by permissions callback
 *
 */
class Status extends WPSynchroService
{
    public function service()
    {
        // Extract parameters
        $body = $this->getRequestBody();
        $parameters = json_decode($body);

        if (isset($parameters->migration_id)) {
            $migration_id = $parameters->migration_id;
        } else {
            $migration_id = '';
        }
        if (isset($parameters->job_id)) {
            $job_id = $parameters->job_id;
        } else {
            $job_id = '';
        }

        $status = new MigrateStatus();
        $status->setup($migration_id, $job_id);
        $sync_response = $status->getMigrationStatus();

        if (isset($sync_response->errors) && count($sync_response->errors) > 0) {
            $sync_response->should_continue = false;
        } else {
            $sync_response->should_continue = true;
        }

        echo json_encode($sync_response);
    }
}

```
