Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
WC_Tracker::get_active_payment_gateways()
Get a list of all active payment gateways.
Description Description
Return Return
(array)
Source Source
File: includes/class-wc-tracker.php
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; }