Automattic\WooCommerce\Api\InputTypes\Products

BaseProductInput{}abstractWC 1.0

Shared fields for product creation and update input types.

No Hooks.

Usage

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

Methods

No Methods in class.

BaseProductInput{} code WC 10.9.1

abstract class BaseProductInput {
	use TracksProvidedFields;

	#[Description( 'The product slug.' )]
	public ?string $slug = null;

	#[Description( 'The product SKU.' )]
	public ?string $sku = null;

	#[Description( 'The full product description.' )]
	public ?string $description = null;

	#[Description( 'The short product description.' )]
	public ?string $short_description = null;

	#[Description( 'The product status.' )]
	public ?ProductStatus $status = null;

	#[Description( 'The product type.' )]
	public ?ProductType $product_type = null;

	#[Description( 'The regular price.' )]
	public ?float $regular_price = null;

	#[Description( 'The sale price.' )]
	public ?float $sale_price = null;

	#[Description( 'Whether to manage stock.' )]
	public ?bool $manage_stock = null;

	#[Description( 'The number of items in stock.' )]
	public ?int $stock_quantity = null;

	#[Description( 'The product dimensions.' )]
	public ?DimensionsInput $dimensions = null;
}