WooCommerce Code Reference

ProductVariation
in package
Uses Product

Output type representing a product variation.

Table of Contents

$attributes  : array<string|int, mixed>
The product attributes.
$date_created  : string|null
The date the product was created.
$date_modified  : string|null
The date the product was last modified.
$description  : string
The full product description.
$dimensions  : ProductDimensions|null
The product dimensions.
$images  : array<string|int, mixed>
The product images.
$internal_notes  : string|null
Internal notes (ignored in schema).
$name  : string
The product name.
$parent_id  : int
$product_type  : ProductType
The product type.
$raw_product_type  : string
The raw product type as stored in WooCommerce. Useful when product_type is OTHER.
$raw_status  : string
The raw status as stored in WordPress. Useful when status is OTHER.
$raw_stock_status  : string
The raw stock status as stored in WooCommerce. Useful when stock_status is OTHER.
$regular_price  : string|null
The regular price of the product. Null when not set.
$reviews  : Connection
Customer reviews for this product.
$sale_price  : string|null
The sale price of the product.
$selected_attributes  : array<string|int, mixed>
$short_description  : string
The short product description.
$sku  : string|null
The product SKU.
$slug  : string
The product slug.
$status  : ProductStatus
The product status.
$stock_quantity  : int|null
The number of items in stock.
$stock_status  : StockStatus
The stock status of the product.

Properties

$raw_product_type

The raw product type as stored in WooCommerce. Useful when product_type is OTHER.

public string $raw_product_type

$raw_stock_status

The raw stock status as stored in WooCommerce. Useful when stock_status is OTHER.

public string $raw_stock_status