woocommerce_payment_gateway_supports
Filter the gateway supported features.
Использование
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(строка)
- Feature to check.
- $that(WC_Payment_Gateway)
- Payment gateway instance.
Список изменений
С версии 1.5.7 | Введена. |
Где вызывается хук
woocommerce_payment_gateway_supports
woocommerce/includes/abstracts/abstract-wc-payment-gateway.php 495
return apply_filters( 'woocommerce_payment_gateway_supports', in_array( $feature, $this->supports, true ), $feature, $this );