admin管理员组

文章数量:1122846

const allProducts = useSelect((select) => {
        return select('core').getEntityRecords('postType', 'product', {
            per_page: -1,
            _embed: true,
        });
    }, [postPerPage, orderBy, order]);

    console.log(allProducts);

the out put is :

there is no additional data like product price, onsale etc. how can I fetch the all data of a product?

本文标签: custom post typesI am having a problem with fetching product data in the Gutenberg block editor