Commit Graph

13 Commits

Author SHA1 Message Date
Rostislav Wolny
f2caa43fdd Use register_block_type_from_metadata directly
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]
2022-01-13 10:14:48 +01:00
Jan Lysý
1ecb12d833 Opt out on WC checkout from configured segments
[MAILPOET-4026]
2022-01-13 09:24:31 +01:00
Jan Lysý
d99c7adf06 Fix spaces in assignments
[MAILPOET-3912]
2022-01-13 09:23:55 +01:00
Rostislav Wolny
0f5391d01a Make sure the marketing optin block script loads in the footer
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]
2021-12-23 08:58:32 +01:00
Rostislav Wolny
1bc968e55f Fix WooCommerce block's checkout error when opt-in is disabled
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]
2021-12-07 09:27:24 +01:00
Rostislav Wolny
ae33ab8d82 Fix loading opt-in block metadata
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]
2021-11-24 13:00:10 +01:00
Rostislav Wolny
a8ad7b7767 Handle checkout subscription for guest/non-registered customers
[MAILPOET-3920]
2021-11-24 13:00:10 +01:00
Rostislav Wolny
6ff678ae1b Fix PHPStan warnings
[MAILPOET-3920]
2021-11-24 13:00:10 +01:00
Rostislav Wolny
bdab97bc00 Use WPFunctions wrapper in MarketingOptinBlock
[MAILPOET-3920]
2021-11-24 13:00:10 +01:00
Rostislav Wolny
98804d981c Add strict types to newly added php files
[MAILPOET-3920]
2021-11-24 13:00:10 +01:00
Mike Jolley
1d0dc612d6 Remove todo
[MAILPOET-3920]
2021-11-24 13:00:10 +01:00
Mike Jolley
70391fdc4c Graduate woocommerce_blocks_checkout_update_order_from_request
[MAILPOET-3920]
2021-11-24 13:00:10 +01:00
Mike Jolley
72d4db26e3 Checkbox implementation and refactor naming structure
[MAILPOET-3920]
2021-11-24 13:00:10 +01:00