Automattic\WooCommerce\Internal\ShopperLists

ShopperListItem::__constructprivateWC 1.0

Private constructor. Use the static factories to obtain concrete instances.

Method of the class: ShopperListItem{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->__construct( $key, $product_id, $variation_id, $variation, $quantity, $date_added_gmt, $product_title_at_save );
$key(string) (required)
Storage key (md5 of identity tuple).
$product_id(int) (required)
Product ID.
$variation_id(int) (required)
Variation ID, or 0.
$variation(array) (required)
Variation attributes.
$quantity(int) (required)
Saved quantity.
$date_added_gmt(string) (required)
MySQL DATETIME, GMT.
$product_title_at_save(string) (required)
Title snapshot.

ShopperListItem::__construct() code WC 10.9.1

private function __construct(
	string $key,
	int $product_id,
	int $variation_id,
	array $variation,
	int $quantity,
	string $date_added_gmt,
	string $product_title_at_save
) {
	$this->key                   = $key;
	$this->product_id            = $product_id;
	$this->variation_id          = $variation_id;
	$this->variation             = $variation;
	$this->quantity              = $quantity;
	$this->date_added_gmt        = $date_added_gmt;
	$this->product_title_at_save = $product_title_at_save;
}