Ok, this is probably the easiest workaround I was able to find, but if someone has better idea, then feel free to post it here 😉
import {
__experimentalUseInnerBlocksProps,
useInnerBlocksProps,
} from '@wordpress/block-editor';
if( typeof useInnerBlocksProps == 'undefined' ){
var compatibleUseInnerBlocksProps = __experimentalUseInnerBlocksProps;
}else{
var compatibleUseInnerBlocksProps = useInnerBlocksProps;
}
- so basically I can import both (experimental and no-experimental) without any error
- then I can just do simple type test if the new one is already supported
- if it’s supported I will remember it in
compatibleUseInnerBlocksProps
variable - otherwise I will remember old experimental
- then I need to replace all other occurrences of
useInnerBlocksProps
withcompatibleUseInnerBlocksProps
in my code
Related Posts:
- Passing select control value to block
- Passing RichText attributes to function onChange
- How do I store information in a dynamic block in WordPress?
- How to create custom embed block in gutenberg wordpress
- How to use get_theme_mod in gutenberg editor wordpress?
- How to add Internationalization in WordPress using Javascript/React?
- how to disable blockrenderAppender inside all Innerblocks?
- Using SVN to upload plugin created with gutenberg blocks
- How to export post 2 posts WordPress plugin data [closed]
- WP All Import – Execute Imports
- How to add custom table style for table block in gutenberg editor
- Gutenberg Block Style CSS Class Is Not Applying on Backend
- Why is the ‘Gutenberg’ Plugin generating an ‘Inconsistent File Permissions’ error when other Plugins, with the same permissions, do not?
- Set Multiple Meta Values as an Array Using dispatch( ‘core/editor’ ).editPost() Call in Gutenberg/JS
- Plugin generating unexpected output – on WP mysql dump import
- Use a custom block in another block
- Gutenberg default attributes are empty when accessing in edit
- Set Button in PluginDocumentSettingPanel Content (WordPress Gutenberg)
- Has blocks gutenberg block multiples registers type in my Plugin
- Fixed: Console.log twice in the edit function
- How to resolve warning for `unstableOnSplit` prop on a DOM element in block editor
- How to dynamically add template in Innerblock?
- best way to upload a large file to wordpress using wp all import
- Block content rendering on the top just below body tag
- Gutenberg: Dynamic Block – Show saved data in the editor
- Create plugin with multiple blocks
- How do I set register_meta for a specific CPT?
- How do I save meta key value in the save function?
- Update Content for a Custom Block Toolbar Button
- Wrong block appender button showing
- How to get custom setting from get_option and pass it in getEntityRecords in gutenberg block?
- Vanilla javascript in custom gutenberg block not working
- WordPress custom block: Link saved in database not retrieved when editing post
- Why is my Gutenberg block not saving and rendering the chessboard?
- How can we extent core/group or cover block?
- Include theme header and footer in custom plugin
- Editing a block to add a button to have a drop cap
- Zip using “wp-scripts plugin-zip” with custom “build” folder and subfolders?
- How to list latest 5 posts from each author from a custom CPT? I want to create a custom Gutenberg block
- Custom block padding control (via support) initialization
- WordPress custom block: How to treat each button as a separate block?
- Custom block based off core block using filter
- How to change the version of block.js and plugin to the same of Package.json?
- How to prevent WP All Export from wrapping XML nodes in CDATA? [closed]
- How do I apply different block supports to different parts of my custom block?
- Best approach to fetch data from wp options to js file or php file
- Correct way to perform non-cacheable DB query
- Why Won’t Exported Blog From One Site Import Into New Site?
- Allow users of my plugin to define their own shortcode rather than use mine?
- Is it possible to create Custom Post plug-in?
- uninstall.php file in Plugin to clean DB
- Archive – same title for the first two posts
- Creating a plugin to sanitize comment and the url field before display only
- Edit Yoast SEO breadcrumbs output [closed]
- Creating plugin using simple_html_dom parser?
- Object Oriented Plugin not working
- Does WP identify plugin by plugin name or plugin_basename?
- switched from query_posts to WP_query, not working now?
- Making a plugin only available on the front-end for the logged in super admin
- Media is not attached after import
- Create entire wordpress as a github repositery?
- Help With MySQL to WPDB Query Conversion
- When to load auto-login code?
- AJAX search posts and pages
- How to find the origin of a file upload from within wp_handle_upload?
- How would I go about creating a user ranked post popularity page?
- CSV file generation failing
- Updating the Drag-To-Share eXtended share URLs?
- finding whether request is for post, and post id
- Building plugin with changeable custom post type values…advice needed
- How to get all of the activate_plugin action parameters?
- __callStatic method handler passed to add_action causes bug in PHP
- Enqueue WordPress plugin scripts below all other JS
- Display update notification messages like ‘What’s New’
- Creating an online questionnaire form – by Importing the questions from a spreadsheet?
- CRUD and Frontend show from a custom table without shortcode
- How to get specific setting by settings_fields()?
- Save / Show multi line text in metabox
- Creating mySQL procedure with $wpdb
- why doesn’t this update part of this plugin work? it take me to nothing here page
- Redirection of users away from wp-admin (but not administrators)
- Cannot find a list of data selectors for Gutenberg editor
- Using a custom plugin to capture input data via Ajax and PHP
- Python with wordpress plugin
- Display post lists in 2nd paragraph
- Map Custom Registration Fields to WordPress User Roles
- Not able to add option in Sub-Menu under page
- How to stop activating a plugin and show admin notice when dependent plugins minimum version is not met
- Using a post-signup hook to get user details
- How to apply a patch via plugin?
- Fixing WordPress’s Bug (failed to send buffer of zlib output compression) results in “White Screen of Death”
- Disable woocommerce cookies and delete cart data automatically
- Ajax contact form widget plugin data not insert in database
- link bbpress forum discussion to blogposts
- Install Plugin via Code
- code is working properly in Core PHP but writing coding in WordPress
- Combine scripts from all extensions of the plugin when an extension is activated
- Creating a custom post type, adding custom meta fields, preventing all future editability of posts of this type
- Add button gutenberg help
- Prevent duplicate records in plugin table