Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLTypes\Enums
DiscountType::get
Метод класса: DiscountType{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$result = DiscountType::get(): EnumType;
Код DiscountType::get() DiscountType::get WC 11.0.1
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;
}