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

Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks

Purchase::get_products() public WC 1.0

Get purchaseable and remaining products.

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

Хуков нет.

Возвращает

Массив.

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

$result = Purchase::get_products();

Код Purchase::get_products() WC 6.1.0

public static function get_products() {
	$profiler_data = get_option( Onboarding::PROFILE_DATA_OPTION, array() );
	$installed     = PluginsHelper::get_installed_plugin_slugs();
	$product_types = isset( $profiler_data['product_types'] ) ? $profiler_data['product_types'] : array();
	$allowed       = Onboarding::get_allowed_product_types();
	$purchaseable  = array();
	$remaining     = array();
	foreach ( $product_types as $type ) {
		if ( ! isset( $allowed[ $type ]['slug'] ) ) {
			continue;
		}

		$purchaseable[] = $allowed[ $type ];

		if ( ! in_array( $allowed[ $type ]['slug'], $installed, true ) ) {
			$remaining[] = $allowed[ $type ]['label'];
		}
	}

	return array(
		'purchaseable' => $purchaseable,
		'remaining'    => $remaining,
	);
}