Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks

AdditionalPayments::has_enabled_additional_gateways()private staticWC 1.0

Check if the store has any enabled gateways in additional category.

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

Хуков нет.

Возвращает

true|false.

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

$result = AdditionalPayments::has_enabled_additional_gateways();

Код AdditionalPayments::has_enabled_additional_gateways() WC 9.4.2

private static function has_enabled_additional_gateways() {
	$additional_gateways     = self::get_suggestion_gateways( 'category_additional' );
	$additional_gateways_ids = wp_list_pluck( $additional_gateways, 'id' );

	return self::has_enabled_gateways(
		function( $gateway ) use ( $additional_gateways_ids ) {
			return 'yes' === $gateway->enabled
			&& in_array( $gateway->id, $additional_gateways_ids, true );
		}
	);
}