I'm trying to create my own block to show recent products.
I was trying to create similar code for Products but I've a problem with this part:
const { posts } = useSelect(
(select) => {
const posts = select('core').getEntityRecords('postType', 'product', {
per_page: numberOfItems,
_embed: true,
});
return {
posts: posts,
};
},
[numberOfItems],
);
And the question is: How to get more info about products (e.g. price)?