Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks

WooCommercePayments::get_gateway()private staticWC 1.0

Get the WooPayments gateway.

Method of the class: WooCommercePayments{}

No Hooks.

Return

\WC_Payments|null.

Usage

$result = WooCommercePayments::get_gateway();

WooCommercePayments::get_gateway() code WC 9.7.1

private static function get_gateway() {
	$payment_gateways = WC()->payment_gateways->payment_gateways();
	if ( isset( $payment_gateways['woocommerce_payments'] ) ) {
		return $payment_gateways['woocommerce_payments'];
	}
	return null;
}