WordPress at Your Fingertips
function is not described

WC_Payment_Gateways::filter_valid_gateway_class() protected WC 3.6.0

Callback for array filter. Returns true if gateway is of correct type.

{} It's a 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.

Code of WC_Payment_Gateways::filter_valid_gateway_class() WC 5.9.0

protected function filter_valid_gateway_class( $gateway ) {
	return $gateway && is_a( $gateway, 'WC_Payment_Gateway' );
}