Use editedRecord in hook useEntityRecord

This commit is contained in:
Nathan Schneider 2024-04-09 14:08:15 -03:00
parent d4716a27b7
commit c28e005e7b
3 changed files with 3 additions and 3 deletions

View File

@ -155,7 +155,7 @@ export function BlockEditor( {
{ postType }
);
const { record: product } = useEntityRecord< Product >(
const { editedRecord: product } = useEntityRecord< Product >(
'postType',
postType,
productId

View File

@ -60,7 +60,7 @@ export function useProductVariationsHelper() {
'id'
);
const { record: product } = useEntityRecord< Product >(
const { editedRecord: product } = useEntityRecord< Product >(
'postType',
'product',
productId

View File

@ -23,5 +23,5 @@ declare module '@wordpress/core-data' {
kind: string,
name: string,
id: number | string
): { record: T };
): { record: T, editedRecord: T };
}