Add sub subpage endpoint in woocommerce

Thanks to @mmm and his comment defining $endpointsub before $endpoint it worked. Not sure why that is but that solved it.

So change the order of endpoints:

$endpointsub = 'my-new-endpoint/new-subendpoint';
$endpoint="my-new-endpoint";

add_rewrite_endpoint( self::$endpointsub, EP_ROOT | EP_PAGES );
add_rewrite_endpoint( self::$endpoint, EP_ROOT | EP_PAGES );

add_query_vars( $vars ) {
        $vars[] = self::$endpointsub;
        $vars[] = self::$endpoint;

        return $vars;
    }