Automattic\WooCommerce\Internal\Admin

WcPayWelcomePage::is_another_payment_gateway_installed()privateWC 1.0

Checks if there is another payment gateway installed using a static list of US gateways from WC Store.

Метод класса: WcPayWelcomePage{}

No Hooks.

Return

true|false. Whether there is another payment gateway installed.

Usage

// private - for code of main (parent) class only
$result = $this->is_another_payment_gateway_installed();

Code of WcPayWelcomePage::is_another_payment_gateway_installed() WC 7.1.0

private function is_another_payment_gateway_installed() {
	$available_gateways = wp_list_pluck( WC()->payment_gateways()->get_available_payment_gateways(), 'id' );

	foreach ( $available_gateways as $gateway ) {
		if ( in_array( $gateway, self::OTHER_GATEWAYS, true ) ) {
			return true;
		}
	}

	return false;
}