Skip to content

Commit

Permalink
remove not needed wc_clean
Browse files Browse the repository at this point in the history
  • Loading branch information
oaratovskyi committed Dec 15, 2024
1 parent 1ac712d commit ff9d16e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion includes/class-wc-payments-onboarding-service.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ public function get_capabilities_from_request(): array {
// Try to extract the capabilities.
// They might be already decoded or not, so we need to handle both cases.
// We expect them to be an array.
$capabilities = wc_clean( wp_unslash( $_REQUEST['capabilities'] ) ); // phpcs:disable WordPress.Security.NonceVerification.Recommended
// phpcs:disable WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
$capabilities = wp_unslash( $_REQUEST['capabilities'] );
if ( ! is_array( $capabilities ) ) {
$capabilities = json_decode( $capabilities, true ) ?? [];
}
Expand Down

0 comments on commit ff9d16e

Please sign in to comment.