Automattic\WooCommerce\Admin\API
OnboardingProfile::get_profile_properties() │ public static │ WC 1.0
Get onboarding profile properties.
Метод класса: OnboardingProfile{}
Хуки из метода
Возвращает
Массив
.
Использование
$result = OnboardingProfile::get_profile_properties();
Код OnboardingProfile::get_profile_properties() OnboardingProfile::get profile properties WC 9.5.1
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( OnboardingProducts::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', ), ), 'number_employees' => array( 'type' => 'string', 'description' => __( 'Number of employees of the store.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, 'validate_callback' => 'rest_validate_request_arg', 'enum' => array( '1', '<10', '10-50', '50-250', '+250', 'not specified', ), ), '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( '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' ), ), 'is_store_country_set' => array( 'type' => 'boolean', 'description' => __( 'Whether or not this store country is set via onboarding profiler.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, 'validate_callback' => 'rest_validate_request_arg', ), 'is_plugins_page_skipped' => array( 'type' => 'boolean', 'description' => __( 'Whether or not plugins step in core profiler was skipped.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, 'validate_callback' => 'rest_validate_request_arg', ), ); return apply_filters( 'woocommerce_rest_onboarding_profile_properties', $properties ); }