diff --git a/assets/js/base/hocs/with-reviews.js b/assets/js/base/hocs/with-reviews.js index 0c1a50fd882..16de44cc9bc 100644 --- a/assets/js/base/hocs/with-reviews.js +++ b/assets/js/base/hocs/with-reviews.js @@ -106,10 +106,14 @@ const withReviews = ( OriginalComponent ) => { offset: reviewsToSkip, }; - if ( categoryIds && categoryIds.length ) { - args.category_id = Array.isArray( categoryIds ) - ? categoryIds.join( ',' ) - : categoryIds; + if ( categoryIds ) { + const categories = Array.isArray( categoryIds ) + ? categoryIds + : JSON.parse( categoryIds ); + + args.category_id = Array.isArray( categories ) + ? categories.join( ',' ) + : categories; } if ( productId ) {