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
- How can I find plugins’ slug?
- My custom made plugin has “a new version available” which links to unrelated plugin
- wp.media update options and force render on uploader
- How to remove duplicate sub-menu name for top level menu items in a plugin?
- WordPress Plugin Development from Scratch. How? [closed]
- How to fetch serialized data from wordpress options
- Passing URL parameters to WordPress pages and pretty url
- WordPress network: set themes and plugins for new blog
- How to get the custom page get_permalink?
- Plugin translations problem
- Advanced Custom Fields into functions.php
- How ( and mostly at what time ) can i prevent the alternate cron from running?
- What is the function to get plugin base url in multisite?
- How do I register a stylesheet inside a WordPress widget?
- WordPress register_activation_hook table creation not working
- How to remove an Ajax action
- nonces in custom oop plugin
- Has anyone used require.js for handling plugin scripts?
- Multiple files in a plugin
- Wp die causing 500 Internal Server Error?
- Gutenberg Blocks – Change EDIT part of the block using editor.BlockEdit filters. How to change the markup?
- adding a new value to a serialized array in WP_option table
- Redirect to a welcome page after updating plugin
- Write to / remove from default .htaccess file from plugin?
- Remove rewrite rules generated by plugin during deactivation‎
- 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
- Consolidate plugin functionality into a theme
- qTranslate remove default directory from link
- Count posts by type including drafts and pending posts
- List the authors that have written posts in a category
- My custom plugin did not create db tables in database
- WordPress Multisite: Programmatically Activate / Deactivate a Plugin of a Specific Blog
- composer not working on my plugin when i upload it to my website
- What is the WordPress approach to custom data?
- WordPress Fatal Errors [closed]
- YOAST Seo xmlsitemap menu item not showing in the dashboard [closed]
- Possible?? Pull Plugin Property Data to a Theme’s Custom Post Type
- How to rewrite URL and get the values?
- Disable plugin visibility at the plugin directory
- Plugin is creating posts twice
- How to deactivate my plugin upon deactivation of NextGen
- Widgets are not displaying in the admin panel
- How to overwrite the category template in a plugin
- Content-Security-Policy implementation with WordPress W3Total Cache plugin installed
- Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?
- show wc_add notices on particular page in woo commerce custom plugin development
- How to write different events from different functions in my file to a log file in WordPress
- Create a form and have custom menu display based on user answers?
- How to make a plugin api route have permission?
- Why my multisite is this slow? (stats inside)
- Modify Plugin PHP Class in Child Theme – Correct Method
- How to use custom footer template in a site-plugin?
- Problem with conditional woocommerce custom checkout field
- trying to create simple plugin to filter categories from all authors
- Change wp_mail SMTP settings for each E-Mail
- Proper Failure of Plugin Activation
- WordPress Thumbnail add action if no thumbnail
- How can I add the custom taxonomy categories to the posts and pages?
- Pass strings to plugin function [closed]
- How to create a page template using custom plugin
- WordPress 3,5 and Jquery version
- contact form 7 captcha support anyother captcha plugin? [closed]
- Unable to pass arguments from plugin form to filter hook using ajax, the data is transferring via ajax but unable to pass as arguments in filter hooks
- How to update changes to multiple sites at the same time
- Why am I getting an error when requiring a file in my plugin?
- Allow manage_options capability for specific user only for specific plugin?