woocommerce_payment_gateway_supports
Filter the gateway supported features.
Usage
add_filter( 'woocommerce_payment_gateway_supports', 'wp_kama_woocommerce_payment_gateway_supports_filter', 10, 3 );
/**
* Function for `woocommerce_payment_gateway_supports` filter-hook.
*
* @param boolean $supports If the gateway supports the feature.
* @param string $feature Feature to check.
* @param WC_Payment_Gateway $that Payment gateway instance.
*
* @return boolean
*/
function wp_kama_woocommerce_payment_gateway_supports_filter( $supports, $feature, $that ){
// filter...
return $supports;
}
- $supports(true|false)
- If the gateway supports the feature.
- $feature(string)
- Feature to check.
- $that(WC_Payment_Gateway)
- Payment gateway instance.
Changelog
| Since 1.5.7 | Introduced. |
Where the hook is called
woocommerce_payment_gateway_supports
woocommerce/includes/abstracts/abstract-wc-payment-gateway.php 530
return apply_filters( 'woocommerce_payment_gateway_supports', in_array( $feature, $this->supports, true ), $feature, $this );