$this->get_endpoints(), ) ); } private function get_endpoints() { $route_library = Transactions_Routes_Library::instance(); $endpoints = $route_library->get_routes(); $endpoints_array = array(); foreach ( $endpoints as $endpoint ) { $endpoint_key = str_replace( '/', '_', $endpoint::get_rest_route() ); if ( ! isset( $endpoints_array[ $endpoint_key ] ) ) { $endpoints_array[ $endpoint_key ] = $endpoint::get_rest_path(); } } return $endpoints_array; } public static function instance() { if ( is_null( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } }