Automattic\WooCommerce\Internal\ShopperLists
ShopperListItem::__construct
Private constructor. Use the static factories to obtain concrete instances.
Метод класса: ShopperListItem{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->__construct( $key, $product_id, $variation_id, $variation, $quantity, $date_added_gmt, $product_title_at_save );
- $key(строка) (обязательный)
- Storage key (md5 of identity tuple).
- $product_id(int) (обязательный)
- Product ID.
- $variation_id(int) (обязательный)
- Variation ID, or 0.
- $variation(массив) (обязательный)
- Variation attributes.
- $quantity(int) (обязательный)
- Saved quantity.
- $date_added_gmt(строка) (обязательный)
- MySQL DATETIME, GMT.
- $product_title_at_save(строка) (обязательный)
- Title snapshot.
Код ShopperListItem::__construct() ShopperListItem:: construct WC 11.0.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;
}