mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Merge pull request #1106 from woocommerce/PCP-994-oxxo-type-error-after-2-0-update
Do not check type in filter callback signature (994)
This commit is contained in:
commit
d7130a9fdc
1 changed files with 9 additions and 1 deletions
|
@ -63,7 +63,15 @@ class OXXO {
|
||||||
|
|
||||||
add_filter(
|
add_filter(
|
||||||
'woocommerce_available_payment_gateways',
|
'woocommerce_available_payment_gateways',
|
||||||
function ( array $methods ): array {
|
/**
|
||||||
|
* Param types removed to avoid third-party issues.
|
||||||
|
*
|
||||||
|
* @psalm-suppress MissingClosureParamType
|
||||||
|
*/
|
||||||
|
function ( $methods ) {
|
||||||
|
if ( ! is_array( $methods ) ) {
|
||||||
|
return $methods;
|
||||||
|
}
|
||||||
|
|
||||||
if ( ! $this->checkout_allowed_for_oxxo() ) {
|
if ( ! $this->checkout_allowed_for_oxxo() ) {
|
||||||
unset( $methods[ OXXOGateway::ID ] );
|
unset( $methods[ OXXOGateway::ID ] );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue