Skip to content

Commit

Permalink
Add a notice about Custom Fields overriding values in usePostMeta
Browse files Browse the repository at this point in the history
Nasty conflict, hard to troubleshoot.

WordPress/gutenberg#23078
  • Loading branch information
lipemat committed Mar 12, 2024
1 parent 4c8c1f3 commit 0495462
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/hooks/usePostMeta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ export function usePostMeta<T extends PostMeta, K extends keyof T = keyof T>( me
* Will return the current meta state as well as the original meta
* state before any changes were made.
*
* @notice The "Custom Fields" panel will override changes made using this hook unless the
* meta field is filtered as `is_protected_meta`.
* @see https://github.com/WordPress/gutenberg/issues/23078
*
*
* @link https://developer.wordpress.org/block-editor/how-to-guides/plugin-sidebar-0/plugin-sidebar-5-update-meta/
*
* @param {string} [metaKey] - Pass a meta key to work with an individual meta key.
Expand Down

0 comments on commit 0495462

Please sign in to comment.