Skip to content

Commit

Permalink
Mute psalm bc ignores wc_clean
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaymo committed Jan 10, 2025
1 parent c47d3e0 commit 1d010cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Payment/MollieObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,9 @@ private function checkBillieCompanyField($order)
}
$isBillieMethodId = $gateway->id === 'mollie_wc_gateway_billie';
if ($isBillieMethodId) {
$company = wc_clean(wp_unslash($_POST["billing_company_billie"] ?? '')) ?: $order->get_billing_company(
//phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
$fieldPosted = wc_clean(wp_unslash($_POST["billing_company_billie"] ?? ''));
$company = $fieldPosted ?: $order->get_billing_company(
) ?: $order->get_shipping_company();
return $company ? $this->maximalFieldLengths($company, self::MAXIMAL_LENGTH_ADDRESS) : null;
}
Expand Down

0 comments on commit 1d010cf

Please sign in to comment.