Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLTypes\Enums

ProductType::getpublic staticWC 1.0

Method of the class: ProductType{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = ProductType::get(): EnumType;

ProductType::get() code WC 10.9.1

public static function get(): EnumType {
	if ( null === self::$instance ) {
		self::$instance = new EnumType(
			array(
				'name'        => 'ProductType',
				'description' => __( 'The type of a WooCommerce product.', 'woocommerce' ),
				'values'      => array(
					'SIMPLE'    => array(
						'value'       => ProductTypeEnum::Simple,
						'description' => __( 'A simple product.', 'woocommerce' ),
					),
					'GROUPED'   => array(
						'value'       => ProductTypeEnum::Grouped,
						'description' => __( 'A grouped product.', 'woocommerce' ),
					),
					'EXTERNAL'  => array(
						'value'       => ProductTypeEnum::External,
						'description' => __( 'An external/affiliate product.', 'woocommerce' ),
					),
					'VARIABLE'  => array(
						'value'       => ProductTypeEnum::Variable,
						'description' => __( 'A variable product with variations.', 'woocommerce' ),
					),
					'VARIATION' => array(
						'value'       => ProductTypeEnum::Variation,
						'description' => __( 'A product variation.', 'woocommerce' ),
					),
					'OTHER'     => array(
						'value'       => ProductTypeEnum::Other,
						'description' => __( 'The product type is not one of the standard WooCommerce values (e.g. added by a plugin). Inspect raw_product_type for the underlying value.', 'woocommerce' ),
					),
				),
			)
		);
	}
	return self::$instance;
}