'html']; $this->pattern_registry->register_block_pattern( $pattern['ID'], $pattern, $this->dictionary ); } } /** * Parse prefixed categories from the PTK patterns into the actual WooCommerce categories. * * @param array $patterns The patterns to parse. * @return array The parsed patterns. */ private function parse_categories( array $patterns ) { return array_map( function ( $pattern ) { $pattern['categories'] = array_map( function ( $category ) { foreach ( self::CATEGORIES_PREFIXES as $prefix ) { if ( strpos( $category['title'], $prefix ) !== false ) { $parsed_category = str_replace( $prefix, '', $category['title'] ); $parsed_category = str_replace( '_', ' ', $parsed_category ); $category['title'] = ucfirst( $parsed_category ); } } return $category; }, $pattern['categories'] ); return $pattern; }, $patterns ); } }
Fatal error: Uncaught Error: Class "Automattic\WooCommerce\Blocks\BlockPatterns" not found in /htdocs/brussels-comics-figurines-museum.be/wp-content/plugins/woocommerce/src/Blocks/Domain/Bootstrap.php:406 Stack trace: #0 /htdocs/brussels-comics-figurines-museum.be/wp-content/plugins/woocommerce/src/Blocks/Registry/AbstractDependencyType.php(42): Automattic\WooCommerce\Blocks\Domain\Bootstrap->Automattic\WooCommerce\Blocks\Domain\{closure}(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #1 /htdocs/brussels-comics-figurines-museum.be/wp-content/plugins/woocommerce/src/Blocks/Registry/SharedType.php(28): Automattic\WooCommerce\Blocks\Registry\AbstractDependencyType->resolve_value(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #2 /htdocs/brussels-comics-figurines-museum.be/wp-content/plugins/woocommerce/src/Blocks/Registry/Container.php(96): Automattic\WooCommerce\Blocks\Registry\SharedType->get(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #3 /htdocs/brussels-comics-figurines-museum.be/wp-content/plugins/woocommerce/src/Blocks/Domain/Bootstrap.php(169): Automattic\WooCommerce\Blocks\Registry\Container->get('Automattic\\WooC...') #4 /htdocs/brussels-comics-figurines-museum.be/wp-content/plugins/woocommerce/src/Blocks/Domain/Bootstrap.php(86): Automattic\WooCommerce\Blocks\Domain\Bootstrap->init() #5 /htdocs/brussels-comics-figurines-museum.be/wp-content/plugins/woocommerce/src/Blocks/Package.php(106): Automattic\WooCommerce\Blocks\Domain\Bootstrap->__construct(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #6 /htdocs/brussels-comics-figurines-museum.be/wp-content/plugins/woocommerce/src/Blocks/Registry/AbstractDependencyType.php(42): Automattic\WooCommerce\Blocks\Package::Automattic\WooCommerce\Blocks\{closure}(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #7 /htdocs/brussels-comics-figurines-museum.be/wp-content/plugins/woocommerce/src/Blocks/Registry/SharedType.php(28): Automattic\WooCommerce\Blocks\Registry\AbstractDependencyType->resolve_value(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #8 /htdocs/brussels-comics-figurines-museum.be/wp-content/plugins/woocommerce/src/Blocks/Registry/Container.php(96): Automattic\WooCommerce\Blocks\Registry\SharedType->get(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #9 /htdocs/brussels-comics-figurines-museum.be/wp-content/plugins/woocommerce/src/Blocks/Package.php(44): Automattic\WooCommerce\Blocks\Registry\Container->get('Automattic\\WooC...') #10 [internal function]: Automattic\WooCommerce\Blocks\Package::init() #11 /htdocs/brussels-comics-figurines-museum.be/wp-content/plugins/woocommerce/src/Packages.php(128): call_user_func(Array) #12 /htdocs/brussels-comics-figurines-museum.be/wp-content/plugins/woocommerce/src/Packages.php(64): Automattic\WooCommerce\Packages::initialize_packages() #13 /htdocs/brussels-comics-figurines-museum.be/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Packages::on_init('') #14 /htdocs/brussels-comics-figurines-museum.be/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #15 /htdocs/brussels-comics-figurines-museum.be/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #16 /htdocs/brussels-comics-figurines-museum.be/wp-settings.php(555): do_action('plugins_loaded') #17 /htdocs/brussels-comics-figurines-museum.be/wp-config.php(101): require_once('/htdocs/brussel...') #18 /htdocs/brussels-comics-figurines-museum.be/wp-load.php(50): require_once('/htdocs/brussel...') #19 /htdocs/brussels-comics-figurines-museum.be/wp-blog-header.php(13): require_once('/htdocs/brussel...') #20 /htdocs/brussels-comics-figurines-museum.be/index.php(17): require('/htdocs/brussel...') #21 {main} thrown in /htdocs/brussels-comics-figurines-museum.be/wp-content/plugins/woocommerce/src/Blocks/Domain/Bootstrap.php on line 406