Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Reviews by Product: fix reviews count not appearing in product select…
Browse files Browse the repository at this point in the history
…or (#11976)
  • Loading branch information
Aljullu authored Nov 29, 2023
1 parent 313e57c commit c3abda3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions assets/js/blocks/reviews/reviews-by-product/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,30 @@ const ReviewsByProductEditor = ( {
return (
<SearchListItem
{ ...args }
item={ {
...item,
count: item.details.review_count,
} }
countLabel={ sprintf(
/* translators: %d is the review count. */
_n(
'%d review',
'%d reviews',
item.review_count,
item.details.review_count,
'woo-gutenberg-products-block'
),
item.review_count
item.details.review_count
) }
aria-label={ sprintf(
/* translators: %1$s is the item name, and %2$d is the number of reviews for the item. */
_n(
'%1$s, has %2$d review',
'%1$s, has %2$d reviews',
item.review_count,
item.details.review_count,
'woo-gutenberg-products-block'
),
item.name,
item.review_count
item.details.review_count
) }
/>
);
Expand Down

0 comments on commit c3abda3

Please sign in to comment.