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

Automattic\WooCommerce\Admin\API

OnboardingProfile::get_profile_properties() public WC 1.0

Get onboarding profile properties.

Ищем WP-разработчика! Фулл-тайм, удаленка, хорошая зарплата, соц. пакет. Подробности.
Компания Boosta.

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

Возвращает

Массив.

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

$result = OnboardingProfile::get_profile_properties();

Код OnboardingProfile::get_profile_properties() WC 5.8.0

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',
		),
		'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',
				'rather-not-say',
			),
		),
		'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',
					'google-listings-and-ads',
					'mailpoet',
				),
				'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',
		),
		'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',
		),
		'is_agree_marketing'  => array(
			'type'              => 'boolean',
			'description'       => __( 'Whether or not this store agreed to receiving marketing contents from WooCommerce.com.', 'woocommerce' ),
			'context'           => array( 'view' ),
			'readonly'          => true,
			'validate_callback' => 'rest_validate_request_arg',
		),
		'store_email'         => array(
			'type'              => 'string',
			'description'       => __( 'Store email address.', 'woocommerce' ),
			'context'           => array( 'view' ),
			'readonly'          => true,
			'validate_callback' => array( __CLASS__, 'rest_validate_marketing_email' ),
		),
	);

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