This doesn't seem to work anymore...?
Any help very welcome ;-)
const Edit = ( props ) => {
const {
attributes,
setAttributes
} = props,
{
productNum,
selectedProductCategory,
displayType
} = attributes;
const wooRequestedElements = useSelect( select => {
const postType = 'product';
const args = {
per_page: 6,
_embed: true,
product_cat: [selectedProductCategory]
};
return select('core').getEntityRecords( 'postType', postType, args );
});