Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLTypes\Enums
StockStatus::get
Method of the class: StockStatus{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = StockStatus::get(): EnumType;
StockStatus::get() StockStatus::get code WC 10.9.1
public static function get(): EnumType {
if ( null === self::$instance ) {
self::$instance = new EnumType(
array(
'name' => 'StockStatus',
'description' => __( 'The stock status of a product.', 'woocommerce' ),
'values' => array(
'IN_STOCK' => array(
'value' => StockStatusEnum::InStock,
'description' => __( 'The product is in stock.', 'woocommerce' ),
),
'OUT_OF_STOCK' => array(
'value' => StockStatusEnum::OutOfStock,
'description' => __( 'The product is out of stock.', 'woocommerce' ),
),
'ON_BACKORDER' => array(
'value' => StockStatusEnum::OnBackorder,
'description' => __( 'The product is on backorder.', 'woocommerce' ),
),
'OTHER' => array(
'value' => StockStatusEnum::Other,
'description' => __( 'The stock status is not one of the standard WooCommerce values (e.g. added by a plugin). Inspect raw_stock_status for the underlying value.', 'woocommerce' ),
),
),
)
);
}
return self::$instance;
}