|
/ Documentation /Developer Hooks & Events/ suredonation_import_givewp_session_created Action Hook

suredonation_import_givewp_session_created Action Hook

Overview

The suredonation_import_givewp_session_created action fires immediately after a new GiveWP migration session has been created and its initial progress payload persisted. Use it to initialize per-session state your extension needs during a GiveWP import.

Hook Signature

do_action( 'suredonation_import_givewp_session_created', $import_id, $progress );

Parameters

  • $import_id _(string)_ – The newly generated session UUID.
  • $progress _(array)_ – The full initial progress payload. Keys include:
  • import_id _(string)_, started_at _(string, UTC MySQL datetime)_, started_by _(int, user ID)_
  • options _(array)_ – Resolved session options.
  • phases _(array)_ – Resolved phase list.
  • current_phase _(int)_ = 0, offset _(int)_ = 0
  • campaign_map _(array)_ = [], donor_map _(array)_ = []
  • status _(string)_ = ‘running’, results _(array)_

Usage

add_action( 'suredonation_import_givewp_session_created', 'your_custom_function', 10, 2 );

function your_custom_function( $import_id, $progress ) {

    // Your custom logic here.

}

Example

add_action( 'suredonation_import_givewp_session_created', 'mysite_log_import_start', 10, 2 );

function mysite_log_import_start( $import_id, $progress ) {

    error_log( sprintf(

        'GiveWP import %s started with phases: %s',

        $import_id,

        implode( ', ', $progress['phases'] )

    ) );

}

Related Hooks

  • suredonation_import_givewp_batch_complete
  • suredonation_import_givewp_phases
  • suredonation_import_givewp_phase_mappers
Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
Table of Contents
Scroll to Top