Product Gallery block: Fix 404 errors occurring on frontend (https://github.com/woocommerce/woocommerce-blocks/pull/10555)

* Prevent block from loading frontend scripts

* Fix issue with Product Gallery not being registered on the Editor

* Fix php cs error
This commit is contained in:
Alexandre Lara 2023-08-21 20:20:48 -03:00 committed by GitHub
parent 40a7a755f2
commit 2f65c6cdd4
1 changed files with 9 additions and 0 deletions

View File

@ -20,4 +20,13 @@ class ProductGallery extends AbstractBlock {
protected function get_block_type_style() {
return null;
}
/**
* It isn't necessary register block assets because it is a server side block.
*/
protected function register_block_type_assets() {
parent::register_block_type_assets();
return null;
}
}