wc_migrator_session_completed action-hookWC 10.3.0

Fires when a migration session completes.

Usage

add_action( 'wc_migrator_session_completed', 'wp_kama_wc_migrator_session_completed_action', 10, 2 );

/**
 * Function for `wc_migrator_session_completed` action-hook.
 * 
 * @param string $platform    The platform being migrated from.
 * @param array  $final_stats Final migration statistics.
 *
 * @return void
 */
function wp_kama_wc_migrator_session_completed_action( $platform, $final_stats ){

	// action...
}
$platform(string)
The platform being migrated from.
$final_stats(array)
Final migration statistics.

Changelog

Since 10.3.0 Introduced.

Where the hook is called

ProductsController::migrate_products()
wc_migrator_session_completed
woocommerce/src/Internal/CLI/Migrator/Core/ProductsController.php 205
do_action( 'wc_migrator_session_completed', $this->parsed_args['platform'], $final_stats );

Where the hook is used in WooCommerce

woocommerce/src/Internal/CLI/Migrator/Core/MigratorTracker.php 49
add_action( 'wc_migrator_session_completed', array( $this, 'on_session_completed' ), 10, 2 );