WC_Payment_Gateways::filter_valid_gateway_class()
Callback for array filter. Returns true if gateway is of correct type.
Method of the class: WC_Payment_Gateways{}
No Hooks.
Return
true|false
.
Usage
// protected - for code of main (parent) or child class $result = $this->filter_valid_gateway_class( $gateway );
- $gateway(object) (required)
- Gateway to check.
Changelog
Since 3.6.0 | Introduced. |
WC_Payment_Gateways::filter_valid_gateway_class() WC Payment Gateways::filter valid gateway class code WC 7.5.0
protected function filter_valid_gateway_class( $gateway ) { return $gateway && is_a( $gateway, 'WC_Payment_Gateway' ); }