Whole site’s pagination not working after rewriting product permalink

I have to rewrite the product’s permalink by changing it from the default /product/product-name into /%product-cat%/product-name. %product-cat% is a custom category. But after I rewrite it, the pagination for product review is not working. Not matter what page I click, the url is correct but the reviews are always stuck at first page. This is my first attempt on doing a permalink rewrite. Did I missed out anything or added wrong line of code thus causing the pagination query to fail?

pagination with numbers for WP_User_Query

I have pagination with next/previous links but I also would like to show numbers so the user can click on 2, 3, 4 etc. Pagination seems more tricky with WP_User_Query as there isn’t any default WordPress pagination for this as far as I know. The below works correctly as far as I can tell for the next and previous links.