Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLTypes\Enums
ProductType{}
Хуков нет.
Использование
$ProductType = new ProductType(); // use class methods
Методы
- public static get()
Код ProductType{} ProductType{} WC 10.8.1
class ProductType {
private static ?EnumType $instance = null;
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;
}
}