Automattic\WooCommerce\Internal\Admin\Settings\PaymentsProviders\WooPayments

WooPaymentsService::was_onboarding_step_marked_completedprivateWC 1.0

Check if an onboarding step has been marked as completed.

This means that, at some point, the step was marked/recorded as completed in the DB. This doesn't mean that the current reported status is completed. The step status might be different now.

Method of the class: WooPaymentsService{}

No Hooks.

Returns

true|false. Whether the onboarding step has been marked as completed.

Usage

// private - for code of main (parent) class only
$result = $this->was_onboarding_step_marked_completed( $step_id, $location ): bool;
$step_id(string) (required)
The ID of the onboarding step.
$location(string) (required)
The location for which we are onboarding. This is an ISO 3166-1 alpha-2 country code.

Notes

  • See: get_onboarding_step_status() for that.

WooPaymentsService::was_onboarding_step_marked_completed() code WC 10.7.0

private function was_onboarding_step_marked_completed( string $step_id, string $location ): bool {
	$statuses = (array) $this->get_nox_profile_onboarding_step_entry( $step_id, $location, 'statuses' );

	return ! empty( $statuses[ self::ONBOARDING_STEP_STATUS_COMPLETED ] );
}