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

ProductStatus{}WC 1.0

No Hooks.

Usage

$ProductStatus = new ProductStatus();
// use class methods

Methods

  1. public static get()

ProductStatus{} code WC 10.8.1

class ProductStatus {
	private static ?EnumType $instance = null;

	public static function get(): EnumType {
		if ( null === self::$instance ) {
			self::$instance = new EnumType(
				array(
					'name'        => 'ProductStatus',
					'description' => __( 'The publication status of a product.', 'woocommerce' ),
					'values'      => array(
						'DRAFT'   => array(
							'value'       => ProductStatusEnum::Draft,
							'description' => __( 'The product is a draft.', 'woocommerce' ),
						),
						'PENDING' => array(
							'value'       => ProductStatusEnum::Pending,
							'description' => __( 'The product is pending review.', 'woocommerce' ),
						),
						'ACTIVE'  => array(
							'value'       => ProductStatusEnum::Published,
							'description' => __( 'The product is published and visible.', 'woocommerce' ),
						),
						'PRIVATE' => array(
							'value'       => ProductStatusEnum::Private,
							'description' => __( 'The product is privately published.', 'woocommerce' ),
						),
						'FUTURE'  => array(
							'value'       => ProductStatusEnum::Future,
							'description' => __( 'The product is scheduled to be published in the future.', 'woocommerce' ),
						),
						'TRASH'   => array(
							'value'             => ProductStatusEnum::Trash,
							'description'       => __( 'The product is in the trash.', 'woocommerce' ),
							'deprecationReason' => 'Trashed products should be excluded via status filter.',
						),
						'OTHER'   => array(
							'value'       => ProductStatusEnum::Other,
							'description' => __( 'The product 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;
	}
}