Automattic\WooCommerce\Internal\ShopperLists

ShopperList::to_arraypublicWC 1.0

Storage / response shape.

Метод класса: ShopperList{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$ShopperList = new ShopperList();
$ShopperList->to_array(): array;

Код ShopperList::to_array() WC 10.9.1

public function to_array(): array {
	$items_array = array();
	foreach ( $this->items as $key => $item ) {
		$items_array[ $key ] = $item->to_array();
	}

	return array(
		'slug'             => $this->slug,
		'date_created_gmt' => $this->date_created_gmt,
		'items'            => $items_array,
	);
}