Automattic\WooCommerce\Blocks\Payments

PaymentMethodRegistry::get_all_active_registered()publicWC 1.0

Retrieves all registered payment methods that are also active.

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

Хуков нет.

Возвращает

PaymentMethodTypeInterface[].

Использование

$PaymentMethodRegistry = new PaymentMethodRegistry();
$PaymentMethodRegistry->get_all_active_registered();

Код PaymentMethodRegistry::get_all_active_registered() WC 7.1.0

public function get_all_active_registered() {
	return array_filter(
		$this->get_all_registered(),
		function( $payment_method ) {
			return $payment_method->is_active();
		}
	);
}