Basic block structure and checkbox import
[MAILPOET-3920]
This commit is contained in:
@@ -17,5 +17,14 @@ class NewsletterBlock {
|
||||
|
||||
public function init() {
|
||||
$this->wp->registerBlockType( Env::$assetsPath . '/js/src/newsletter_block' );
|
||||
$this->wp->addFilter(
|
||||
'__experimental_woocommerce_blocks_add_data_attributes_to_block',
|
||||
[$this, 'addDataAttributesToBlock']
|
||||
);
|
||||
}
|
||||
|
||||
public function addDataAttributesToBlock( array $blocks ) {
|
||||
$blocks[] = 'mailpoet/newsletter-block';
|
||||
return $blocks;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user