Skip to content

Commit

Permalink
Add start capabilities data to embedded KYC flow also
Browse files Browse the repository at this point in the history
  • Loading branch information
vladolaru committed Dec 15, 2024
1 parent 767cdd2 commit 0593629
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions includes/class-wc-payments-onboarding-service.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,15 +268,19 @@ public function create_embedded_kyc_session( array $self_assessment_data, bool $
'site_locale' => get_locale(),
];
$user_data = $this->get_onboarding_user_data();
$account_data = $this->get_account_data( $setup_mode, $self_assessment_data );
$account_data = $this->get_account_data(
$setup_mode,
$self_assessment_data,
$this->get_capabilities_from_request()
);
$actioned_notes = self::get_actioned_notes();

try {
$account_session = $this->payments_api_client->initialize_onboarding_embedded_kyc(
'live' === $setup_mode,
$site_data,
array_filter( $user_data ), // nosemgrep: audit.php.lang.misc.array-filter-no-callback -- output of array_filter is escaped.
array_filter( $account_data ), // nosemgrep: audit.php.lang.misc.array-filter-no-callback -- output of array_filter is escaped.
WC_Payments_Utils::array_filter_recursive( $user_data ), // nosemgrep: audit.php.lang.misc.array-filter-no-callback -- output of array_filter is escaped.
WC_Payments_Utils::array_filter_recursive( $account_data ), // nosemgrep: audit.php.lang.misc.array-filter-no-callback -- output of array_filter is escaped.
$actioned_notes,
$progressive
);
Expand Down

0 comments on commit 0593629

Please sign in to comment.