Merge pull request #1876 from woocommerce/PCP-2385-disable-funding-field-access

Fix disable-funding field access
This commit is contained in:
Emili Castells 2023-11-30 09:33:13 +01:00 committed by GitHub
commit 0d3a5de0b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -214,7 +214,7 @@ class PayPalPaymentMethod extends AbstractPaymentMethodType {
}
}
$disabled_funding_sources = explode( ',', $script_data['url_params']['disable-funding'] ) ?: array();
$disabled_funding_sources = explode( ',', $script_data['url_params']['disable-funding'] ?? '' ) ?: array();
$funding_sources = array_values(
array_diff(
array_keys( $this->all_funding_sources ),