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

ProductStatus::getpublic staticWC 1.0

Method of the class: ProductStatus{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

ProductStatus::get() code WC 10.8.1

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;
}