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

CouponStatus::getpublic staticWC 1.0

Method of the class: CouponStatus{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

CouponStatus::get() code WC 10.9.1

public static function get(): EnumType {
	if ( null === self::$instance ) {
		self::$instance = new EnumType(
			array(
				'name'        => 'CouponStatus',
				'description' => __( 'The publication status of a coupon.', 'woocommerce' ),
				'values'      => array(
					'PUBLISHED' => array(
						'value'       => CouponStatusEnum::Published,
						'description' => __( 'The coupon is published and active.', 'woocommerce' ),
					),
					'DRAFT'     => array(
						'value'       => CouponStatusEnum::Draft,
						'description' => __( 'The coupon is a draft.', 'woocommerce' ),
					),
					'PENDING'   => array(
						'value'       => CouponStatusEnum::Pending,
						'description' => __( 'The coupon is pending review.', 'woocommerce' ),
					),
					'PRIVATE'   => array(
						'value'       => CouponStatusEnum::Private,
						'description' => __( 'The coupon is privately published.', 'woocommerce' ),
					),
					'FUTURE'    => array(
						'value'       => CouponStatusEnum::Future,
						'description' => __( 'The coupon is scheduled to be published in the future.', 'woocommerce' ),
					),
					'TRASH'     => array(
						'value'       => CouponStatusEnum::Trash,
						'description' => __( 'The coupon is in the trash.', 'woocommerce' ),
					),
					'OTHER'     => array(
						'value'       => CouponStatusEnum::Other,
						'description' => __( 'The coupon status is not one of the standard WordPress values (e.g. added by a plugin). Inspect raw_status for the underlying value.', 'woocommerce' ),
					),
				),
			)
		);
	}
	return self::$instance;
}