Automattic\WooCommerce\Internal\ShopperLists

ShopperList::to_arraypublicWC 1.0

Storage / response shape.

Method of the class: ShopperList{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

ShopperList::to_array() code 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,
	);
}