WC_Payment_Gateways::filter_valid_gateway_class()protectedWC 3.6.0

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() code WC 8.7.0

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