Skip to content

Commit 2df0cf4

Browse files
authored
adding blocks registration fix (#416)
1 parent 9ebc547 commit 2df0cf4

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.
33

44
This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/).
55

6+
## [9.0.1]
7+
8+
### Fixed
9+
- Blocks registration hooks now uses store registration hooks.
10+
611
## [9.0.0]
712

813
### Changed
@@ -614,6 +619,7 @@ Init setup
614619

615620
[Unreleased]: https://github.com/infinum/eightshift-libs/compare/main...HEAD
616621

622+
[9.0.1]: https://github.com/infinum/eightshift-libs/compare/9.0.0...9.0.1
617623
[9.0.0]: https://github.com/infinum/eightshift-libs/compare/8.0.7...9.0.0
618624
[8.0.7]: https://github.com/infinum/eightshift-libs/compare/8.0.6...8.0.7
619625
[8.0.6]: https://github.com/infinum/eightshift-libs/compare/8.0.5...8.0.6

src/Blocks/AbstractBlocks.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function getAllAllowedBlocksList($allowedBlockTypes, WP_Block_Editor_Cont
131131
$allowedBlockTypes = \array_values(\array_merge(
132132
\array_map(
133133
fn ($block) => $block['blockFullName'],
134-
$this->manifestCache->getManifestCacheTopItem(AbstractManifestCache::BLOCKS_KEY)
134+
Helpers::getBlocks()
135135
),
136136
$allowedBlockTypes,
137137
));
@@ -175,7 +175,7 @@ public function registerBlocks(): void
175175
return;
176176
}
177177

178-
foreach ($this->manifestCache->getManifestCacheTopItem(AbstractManifestCache::BLOCKS_KEY) as $block) {
178+
foreach (Helpers::getBlocks() as $block) {
179179
$this->registerBlock($block);
180180
}
181181
}

0 commit comments

Comments
 (0)