# jc-importer/2.8.1/class/Common/Importer/State/ImporterState.php

Import WP – CSV &amp; XML Import Export for WordPress, version 2.8.1. 40 lines.

- Page: https://pluginprobe.com/plugins/jc-importer/2.8.1/code/class/Common/Importer/State/ImporterState.php
- Raw: https://pluginprobe.com/plugins/jc-importer/2.8.1/raw/class/Common/Importer/State/ImporterState.php
- Modified: 2023-04-21T21:35:38+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/jc-importer/2.8.1/code/class/Common/Importer/State/ImporterState.php#L10-L20`.

```php
<?php

namespace ImportWP\Common\Importer\State;

use ImportWP\Common\Runner\RunnerState;

class ImporterState extends RunnerState
{
    protected static $object_type = 'importer';

    public function is_running()
    {
        return $this->has_status('running');
    }

    public function is_resumable()
    {
        return $this->has_section(['import', 'delete', 'timeout']);
    }

    protected function default($session)
    {
        return array_merge(parent::default($session), [
            'section' => 'import',
            'progress' => [
                'import' => [
                    'start' => 0,
                    'end' => 0,
                    'current_row' => 0,
                ],
                'delete' => [
                    'start' => 0,
                    'end' => 0,
                    'current_row' => 0,
                ]
            ],
        ]);
    }
}

```
