WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Платформа для конвертации и монетизации трафика
функция не описана

Automattic\WooCommerce\Admin\Features

OnboardingTasks::get_settings() public WC 1.0

Get task item data for settings filter.

{} Это метод класса: OnboardingTasks{}

Хуков нет.

Возвращает

Массив.

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

$result = OnboardingTasks::get_settings();

Код OnboardingTasks::get_settings() WC 4.7.1

<?php
public static function get_settings() {
	$settings            = array();
	$wc_pay_is_connected = false;
	if ( class_exists( '\WC_Payments' ) ) {
		$wc_payments_gateway = \WC_Payments::get_gateway();
		$wc_pay_is_connected = method_exists( $wc_payments_gateway, 'is_connected' )
			? $wc_payments_gateway->is_connected()
			: false;
	}

	$gateways         = WC()->payment_gateways->get_available_payment_gateways();
	$enabled_gateways = array_filter(
		$gateways,
		function( $gateway ) {
			return 'yes' === $gateway->enabled;
		}
	);

	// @todo We may want to consider caching some of these and use to check against
	// task completion along with cache busting for active tasks.
	$settings['automatedTaxSupportedCountries'] = self::get_automated_tax_supported_countries();
	$settings['hasHomepage']                    = self::check_task_completion( 'homepage' ) || 'classic' === get_option( 'classic-editor-replace' );
	$settings['hasPaymentGateway']              = ! empty( $enabled_gateways );
	$settings['hasPhysicalProducts']            = count(
		wc_get_products(
			array(
				'virtual' => false,
				'limit'   => 1,
			)
		)
	) > 0;
	$settings['hasProducts']                    = self::check_task_completion( 'products' );
	$settings['isAppearanceComplete']           = get_option( 'woocommerce_task_list_appearance_complete' );
	$settings['isTaxComplete']                  = self::check_task_completion( 'tax' );
	$settings['shippingZonesCount']             = count( \WC_Shipping_Zones::get_zones() );
	$settings['stripeSupportedCountries']       = self::get_stripe_supported_countries();
	$settings['stylesheet']                     = get_option( 'stylesheet' );
	$settings['taxJarActivated']                = class_exists( 'WC_Taxjar' );
	$settings['themeMods']                      = get_theme_mods();
	$settings['wcPayIsConnected']               = $wc_pay_is_connected;

	return $settings;
}