Automattic\WooCommerce\Internal\Admin\Settings\PaymentsProviders\WooPayments
WooPaymentsService::check_onboarding_step_requirements
Check if the requirements for an onboarding step are met.
Method of the class: WooPaymentsService{}
No Hooks.
Returns
true|false. Whether the onboarding step requirements are met.
Usage
// private - for code of main (parent) class only $result = $this->check_onboarding_step_requirements( $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.
WooPaymentsService::check_onboarding_step_requirements() WooPaymentsService::check onboarding step requirements code WC 10.8.1
private function check_onboarding_step_requirements( string $step_id, string $location ): bool {
$requirements = $this->get_onboarding_step_required_steps( $step_id );
foreach ( $requirements as $required_step_id ) {
if ( $this->get_onboarding_step_status( $required_step_id, $location ) !== self::ONBOARDING_STEP_STATUS_COMPLETED ) {
return false;
}
}
return true;
}