Skip to content

Commit

Permalink
Use editedRecord in hook useEntityRecord
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanss committed Apr 9, 2024
1 parent d4716a2 commit c28e005
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export function BlockEditor( {
{ postType }
);

const { record: product } = useEntityRecord< Product >(
const { editedRecord: product } = useEntityRecord< Product >(
'postType',
postType,
productId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function useProductVariationsHelper() {
'id'
);

const { record: product } = useEntityRecord< Product >(
const { editedRecord: product } = useEntityRecord< Product >(
'postType',
'product',
productId
Expand Down
2 changes: 1 addition & 1 deletion packages/js/product-editor/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ declare module '@wordpress/core-data' {
kind: string,
name: string,
id: number | string
): { record: T };
): { record: T, editedRecord: T };
}

0 comments on commit c28e005

Please sign in to comment.