Add a feature flag
[MAILPOET-1709]
This commit is contained in:
@ -592,6 +592,9 @@ Module.PostsWidgetView = base.WidgetView.extend({
|
||||
});
|
||||
|
||||
App.on('before:start', function beforeStartApp(BeforeStartApp) {
|
||||
if (_.isEmpty(window.config.displayWcProductsWidget)) {
|
||||
return;
|
||||
}
|
||||
BeforeStartApp.registerBlockType('products', {
|
||||
blockModel: Module.PostsBlockModel,
|
||||
blockView: Module.PostsBlockView,
|
||||
|
@ -1415,6 +1415,7 @@
|
||||
dragDemoUrlSettings: '<%= settings["user_seen_editor_tutorial" ~ current_wp_user.wp_user_id] %>',
|
||||
installedAt: '<%= settings["installed_at"] %>',
|
||||
mtaMethod: '<%= settings["mta"]["method"] %>',
|
||||
displayWcProductsWidget: '<%= settings["display_wc_products_widget"] %>',
|
||||
};
|
||||
wp.hooks.doAction('mailpoet_newsletters_editor_initialize', config);
|
||||
|
||||
|
Reference in New Issue
Block a user