Skip to content
Docs
Get RestroPress

Action

rpress_import_started

Updated
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#

ParameterTypeDescription
$job_idintImport (job) ID.
$optionsarraySanitised 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), in RPress_Importer_Engine::start()

See also#

Was this page helpful?