Automattic\WooCommerce\Internal\CLI\Migrator\Lib

ImportSession::set_stage │ public │ WC 1.0

Updates the current import stage.

Метод класса: ImportSession{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$ImportSession = new ImportSession();
$ImportSession->set_stage( $stage );
$stage(строка) (обязательный)
The new stage.

Код ImportSession::set_stage() WC 11.1.2

public function set_stage( $stage ) {
	if ( $stage === $this->get_stage() ) {
		return;
	}
	if ( self::STAGE_FINISHED === $stage ) {
		update_post_meta( $this->post_id, 'finished_at', time() );
	}
	update_post_meta( $this->post_id, 'current_stage', $stage );
	$this->cached_stage = $stage;
}