fix: DiviModules::knowsBlock() guards the metadata method, not just the class

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-30 00:57:38 +02:00
co-authored by Claude Opus 5.5
parent fc7a84d239
commit e10a766e2a
+1 -1
View File
@@ -96,7 +96,7 @@ class DiviModules implements DiviAdapter
if (class_exists('WP_Block_Type_Registry') && \WP_Block_Type_Registry::get_instance()->is_registered($name)) { if (class_exists('WP_Block_Type_Registry') && \WP_Block_Type_Registry::get_instance()->is_registered($name)) {
return true; return true;
} }
if (! self::isAvailable()) { if (! method_exists(ModuleRegistration::class, 'get_all_core_modules_metadata')) {
return false; return false;
} }