Reviews by Product: fix reviews count not appearing in product selector (https://github.com/woocommerce/woocommerce-blocks/pull/11976)
This commit is contained in:
parent
5f7836183b
commit
a8c44eb4c7
|
@ -38,26 +38,30 @@ const ReviewsByProductEditor = ( {
|
||||||
return (
|
return (
|
||||||
<SearchListItem
|
<SearchListItem
|
||||||
{ ...args }
|
{ ...args }
|
||||||
|
item={ {
|
||||||
|
...item,
|
||||||
|
count: item.details.review_count,
|
||||||
|
} }
|
||||||
countLabel={ sprintf(
|
countLabel={ sprintf(
|
||||||
/* translators: %d is the review count. */
|
/* translators: %d is the review count. */
|
||||||
_n(
|
_n(
|
||||||
'%d review',
|
'%d review',
|
||||||
'%d reviews',
|
'%d reviews',
|
||||||
item.review_count,
|
item.details.review_count,
|
||||||
'woo-gutenberg-products-block'
|
'woo-gutenberg-products-block'
|
||||||
),
|
),
|
||||||
item.review_count
|
item.details.review_count
|
||||||
) }
|
) }
|
||||||
aria-label={ sprintf(
|
aria-label={ sprintf(
|
||||||
/* translators: %1$s is the item name, and %2$d is the number of reviews for the item. */
|
/* translators: %1$s is the item name, and %2$d is the number of reviews for the item. */
|
||||||
_n(
|
_n(
|
||||||
'%1$s, has %2$d review',
|
'%1$s, has %2$d review',
|
||||||
'%1$s, has %2$d reviews',
|
'%1$s, has %2$d reviews',
|
||||||
item.review_count,
|
item.details.review_count,
|
||||||
'woo-gutenberg-products-block'
|
'woo-gutenberg-products-block'
|
||||||
),
|
),
|
||||||
item.name,
|
item.name,
|
||||||
item.review_count
|
item.details.review_count
|
||||||
) }
|
) }
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue