From f6ac81ae519e824aec6c9655db5b9daf04e58000 Mon Sep 17 00:00:00 2001 From: Dan Tovbein Date: Tue, 2 Jan 2024 11:16:01 -0300 Subject: [PATCH] PLANET-7345: Disable Posts List Query Loop WP variation (#2182) Ref: https://jira.greenpeace.org/browse/PLANET-7345 - Avoid naming confusions to editors since we have already - A Posts List P4 variation with the same name Co-authored-by: Dan Tovbein --- assets/src/blocks/editorIndex.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/assets/src/blocks/editorIndex.js b/assets/src/blocks/editorIndex.js index 9395e6eb02..2e845099da 100644 --- a/assets/src/blocks/editorIndex.js +++ b/assets/src/blocks/editorIndex.js @@ -1,6 +1,11 @@ import {registerPostsListBlock} from './PostsList'; import {registerActionsList} from './ActionsList'; -// Beta blocks -registerActionsList(); -registerPostsListBlock(); +wp.domReady(() => { + // Make sure to unregister the posts-list native variation before registering planet4-blocks/posts-list-block + wp.blocks.unregisterBlockVariation('core/query', 'posts-list'); + + // Beta blocks + registerActionsList(); + registerPostsListBlock(); +});