Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks
AdditionalPayments::has_enabled_other_category_gateways()
Check if the store has any enabled gateways in other category.
Метод класса: AdditionalPayments{}
Хуков нет.
Возвращает
true|false
.
Использование
$result = AdditionalPayments::has_enabled_other_category_gateways();
Код AdditionalPayments::has_enabled_other_category_gateways() AdditionalPayments::has enabled other category gateways WC 9.7.1
private static function has_enabled_other_category_gateways() { $other_gateways = self::get_suggestion_gateways( 'category_other' ); $other_gateways_ids = wp_list_pluck( $other_gateways, 'id' ); return self::has_enabled_gateways( function( $gateway ) use ( $other_gateways_ids ) { return in_array( $gateway->id, $other_gateways_ids, true ); } ); }