Show Products widget only when WC is active
[MAILPOET-1843]
This commit is contained in:
committed by
Rostislav Wolný
parent
42f43e96e1
commit
e2080eea2d
@@ -548,6 +548,9 @@ Module.ProductsWidgetView = base.WidgetView.extend({
|
||||
});
|
||||
|
||||
App.on('before:start', function beforeStartApp(BeforeStartApp) {
|
||||
if (!window.mailpoet_woocommerce_active) {
|
||||
return;
|
||||
}
|
||||
BeforeStartApp.registerBlockType('products', {
|
||||
blockModel: Module.ProductsBlockModel,
|
||||
blockView: Module.ProductsBlockView,
|
||||
|
Reference in New Issue
Block a user