Skip to content

Commit

Permalink
Avoid empty fields in new onboarding flow (#7180)
Browse files Browse the repository at this point in the history
  • Loading branch information
daquinons authored Sep 12, 2023
1 parent ed190bc commit 8aa1e68
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changelog/fix-6981-missing-onboarding-field-data
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Avoid empty fields in new onboarding flow
6 changes: 5 additions & 1 deletion includes/wc-payment-api/class-wc-payments-api-client.php
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,11 @@ public function get_onboarding_fields_data( string $locale = '' ): array {
);

if ( ! is_array( $fields_data ) ) {
return [];
throw new API_Exception(
__( 'Onboarding field data could not be retrieved', 'woocommerce-payments' ),
'wcpay_onboarding_fields_data_error',
400
);
}

return $fields_data;
Expand Down

0 comments on commit 8aa1e68

Please sign in to comment.