Function register_block_type_from_metadata is available since WP5.5
but was added to register_block_type in WP5.8. This will fix notices
for older WP.
[MAILPOET-4036]
This fixes a warning comming fromm WooCommerce blocks:
Scripts that have a dependency on [wc-settings, wc-blocks-checkout] must be loaded in the footer, mailpoet-marketing-optin-block-editor-script was registered to load in the header, but has been switched to load in the footer instead.
[MAILPOET-4030]
When opt-in is disabled it fails to validate checkout data, because it expects
mailpoet.optin to present. This PRs skips extending checkout data schema in case
the opt-in is disabled.
[MAILPOET-4004]
Build version of plugin doesn't contain assets/js folder.
We need to copy block.json file with the metadata to assets/dist directory and load it from there.
[MAILPOET-3920]
We currently don't have tooling for passing translations from scripts to wp.i18n.
This solution provides a temporary way of passing translated strings to wp.i18n for scripts that are
used outside admin pages that are handled via MailPoet.
[MAILPOET-3920]