WordPress at Your Fingertips
function is not described

WC_Tracker::get_active_payment_gateways() private WC 1.0

Get a list of all active payment gateways.

{} It's a method of the class: WC_Tracker{}

No Hooks.

Return

Array.

Usage

$result = WC_Tracker::get_active_payment_gateways();

Code of WC_Tracker::get_active_payment_gateways() WC 5.9.0

private static function get_active_payment_gateways() {
	$active_gateways = array();
	$gateways        = WC()->payment_gateways->payment_gateways();
	foreach ( $gateways as $id => $gateway ) {
		if ( isset( $gateway->enabled ) && 'yes' === $gateway->enabled ) {
			$active_gateways[ $id ] = array(
				'title'    => $gateway->title,
				'supports' => $gateway->supports,
			);
		}
	}

	return $active_gateways;
}