'product', 'numberposts' => $page_size, 'offset' => ( $page - 1 ) * $page_size, ) ); $articles = array(); foreach ( $products as $product ) { $articles[] = Aplazame_Aplazame_Api_BusinessModel_Article::createFromProduct( new WC_Product( $product ) ); } return Aplazame_Api_Router::collection( $page, $page_size, $articles ); } }