Action
rpress_import_started
On this page
Fires when an import is confirmed, before any data is written.
Runs in RPress_Importer_Engine::start() after the job is queued and its state saved, with the job status set to running. The import itself is processed afterwards in batches.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$job_id | int | Import (job) ID. |
$options | array | Sanitised options: 'mode' (add or replace), 'duplicates' (skip or update), 'settings' (bool) and 'customers' (bool). |
Example#
add_action( 'rpress_import_started', 'my_import_started', 10, 2 );
function my_import_started( $job_id, $options ) {
update_option( 'my_last_import_mode', $options['mode'], false );
}
Source#
Fired from:
includes/features/importer/class-rpress-importer-engine.php(line 620), inRPress_Importer_Engine::start()
See also#
Was this page helpful?
