Do not check signature type on filter

This commit is contained in:
emilicastells 2023-01-02 15:08:23 +01:00
parent 2dc6a6322b
commit 83c3dca560
No known key found for this signature in database
GPG key ID: 1520C07081754570

View file

@ -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 ] );