WooCommerce
woocommerce_available_payment_gateways: Hiding Payment Methods by Condition
The filter decides which gateways a shopper sees and which ones the checkout accepts on submit. A condition that reads differently at those two moments produces an Invalid payment method error instead of a hidden option.