Automattic\WooCommerce\Internal\ShopperLists
ShopperList::to_array
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() 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,
);
}