public function get_routes()
{
// index added by default
$endpoints = array('/' => array(array($this, 'get_index'), self::READABLE));
$endpoints = apply_filters('woocommerce_api_endpoints', $endpoints);
// Normalise the endpoints
foreach ($endpoints as $route => &$handlers) {
if (count($handlers) <= 2 && isset($handlers[1]) && !is_array($handlers[1])) {
$handlers = array($handlers);
}
}
return $endpoints;
}