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

Automattic\WooCommerce\Admin\API

OnboardingProfile::get_profile_properties() public WC 1.0

Get onboarding profile properties.

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

Возвращает

Массив. Ничего.

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

$result = OnboardingProfile::get_profile_properties();

Код OnboardingProfile::get_profile_properties() WC 5.2.2

<?php
public static function get_profile_properties() {
	$properties = array(
		'completed'           => array(
			'type'              => 'boolean',
			'description'       => __( 'Whether or not the profile was completed.', 'woocommerce' ),
			'context'           => array( 'view' ),
			'readonly'          => true,
			'validate_callback' => 'rest_validate_request_arg',
		),
		'skipped'             => array(
			'type'              => 'boolean',
			'description'       => __( 'Whether or not the profile was skipped.', 'woocommerce' ),
			'context'           => array( 'view' ),
			'readonly'          => true,
			'validate_callback' => 'rest_validate_request_arg',
		),
		'account_type'        => array(
			'type'              => 'string',
			'description'       => __( 'Account type used for Jetpack.', 'woocommerce' ),
			'context'           => array( 'view' ),
			'readonly'          => true,
			'validate_callback' => 'rest_validate_request_arg',
			'enum'              => array(
				'new',
				'existing',
				'google',
			),
		),
		'industry'            => array(
			'type'              => 'array',
			'description'       => __( 'Industry.', 'woocommerce' ),
			'context'           => array( 'view' ),
			'readonly'          => true,
			'validate_callback' => 'rest_validate_request_arg',
			'items'             => array(
				'type' => 'object',
			),
		),
		'product_types'       => array(
			'type'              => 'array',
			'description'       => __( 'Types of products sold.', 'woocommerce' ),
			'context'           => array( 'view' ),
			'readonly'          => true,
			'sanitize_callback' => 'wp_parse_slug_list',
			'validate_callback' => 'rest_validate_request_arg',
			'items'             => array(
				'enum' => array_keys( Onboarding::get_allowed_product_types() ),
				'type' => 'string',
			),
		),
		'product_count'       => array(
			'type'              => 'string',
			'description'       => __( 'Number of products to be added.', 'woocommerce' ),
			'context'           => array( 'view' ),
			'readonly'          => true,
			'validate_callback' => 'rest_validate_request_arg',
			'enum'              => array(
				'0',
				'1-10',
				'11-100',
				'101-1000',
				'1000+',
			),
		),
		'selling_venues'      => array(
			'type'              => 'string',
			'description'       => __( 'Other places the store is selling products.', 'woocommerce' ),
			'context'           => array( 'view' ),
			'readonly'          => true,
			'validate_callback' => 'rest_validate_request_arg',
			'enum'              => array(
				'no',
				'other',
				'brick-mortar',
				'brick-mortar-other',
				'other-woocommerce',
			),
		),
		'revenue'             => array(
			'type'              => 'string',
			'description'       => __( 'Current annual revenue of the store.', 'woocommerce' ),
			'context'           => array( 'view' ),
			'readonly'          => true,
			'validate_callback' => 'rest_validate_request_arg',
			'enum'              => array(
				'none',
				'up-to-2500',
				'2500-10000',
				'10000-50000',
				'50000-250000',
				'more-than-250000',
			),
		),
		'other_platform'      => array(
			'type'              => 'string',
			'description'       => __( 'Name of other platform used to sell.', 'woocommerce' ),
			'context'           => array( 'view' ),
			'readonly'          => true,
			'validate_callback' => 'rest_validate_request_arg',
			'enum'              => array(
				'shopify',
				'bigcommerce',
				'magento',
				'wix',
				'amazon',
				'ebay',
				'etsy',
				'squarespace',
				'other',
			),
		),
		'other_platform_name' => array(
			'type'              => 'string',
			'description'       => __( 'Name of other platform used to sell (not listed).', 'woocommerce' ),
			'context'           => array( 'view' ),
			'readonly'          => true,
			'validate_callback' => 'rest_validate_request_arg',
		),
		'business_extensions' => array(
			'type'              => 'array',
			'description'       => __( 'Extra business extensions to install.', 'woocommerce' ),
			'context'           => array( 'view' ),
			'readonly'          => true,
			'sanitize_callback' => 'wp_parse_slug_list',
			'validate_callback' => 'rest_validate_request_arg',
			'items'             => array(
				'enum' => array(
					'jetpack',
					'woocommerce-services',
					'woocommerce-payments',
					'mailchimp-for-woocommerce',
					'creative-mail-by-constant-contact',
					'facebook-for-woocommerce',
					'kliken-marketing-for-google',
				),
				'type' => 'string',
			),
		),
		'theme'               => array(
			'type'              => 'string',
			'description'       => __( 'Selected store theme.', 'woocommerce' ),
			'context'           => array( 'view' ),
			'readonly'          => true,
			'sanitize_callback' => 'sanitize_title_with_dashes',
			'validate_callback' => 'rest_validate_request_arg',
		),
		'items_purchased'     => array(
			'type'              => 'boolean',
			'description'       => __( 'Whether or not the user opted to purchase items now or later.', 'woocommerce' ),
			'context'           => array( 'view' ),
			'readonly'          => true,
			'validate_callback' => 'rest_validate_request_arg',
		),
		'setup_client'        => array(
			'type'              => 'boolean',
			'description'       => __( 'Whether or not this store was setup for a client.', 'woocommerce' ),
			'context'           => array( 'view' ),
			'readonly'          => true,
			'validate_callback' => 'rest_validate_request_arg',
		),
		'wccom_connected'     => array(
			'type'              => 'boolean',
			'description'       => __( 'Whether or not the store was connected to WooCommerce.com during the extension flow.', 'woocommerce' ),
			'context'           => array( 'view' ),
			'readonly'          => true,
			'validate_callback' => 'rest_validate_request_arg',
		),
	);

	return apply_filters( 'woocommerce_rest_onboarding_profile_properties', $properties );
}