Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLTypes\Enums
DiscountType{}
No Hooks.
Usage
$DiscountType = new DiscountType(); // use class methods
Methods
- public static get()
DiscountType{} DiscountType{} code WC 10.9.1
class DiscountType {
private static ?EnumType $instance = null;
public static function get(): EnumType {
if ( null === self::$instance ) {
self::$instance = new EnumType(
array(
'name' => 'DiscountType',
'description' => __( 'The type of discount for a coupon.', 'woocommerce' ),
'values' => array(
'PERCENT' => array(
'value' => DiscountTypeEnum::Percent,
'description' => __( 'A percentage discount.', 'woocommerce' ),
),
'FIXED_CART' => array(
'value' => DiscountTypeEnum::FixedCart,
'description' => __( 'A fixed amount discount applied to the cart.', 'woocommerce' ),
),
'FIXED_PRODUCT' => array(
'value' => DiscountTypeEnum::FixedProduct,
'description' => __( 'A fixed amount discount applied to each eligible product.', 'woocommerce' ),
),
'OTHER' => array(
'value' => DiscountTypeEnum::Other,
'description' => __( 'The discount type is not one of the standard WooCommerce values (e.g. added by a plugin). Inspect raw_discount_type for the underlying value.', 'woocommerce' ),
),
),
)
);
}
return self::$instance;
}
}