n favor of the new blocks while keeping the old * hooked functions working in classic templates. * * Accepts an array of hooked data. The array should be in the following * format: * [ * [ * hook => , * function => , * priority => , * ], * ... * ] * Where: * - hook-name is the name of the hook that have the functions hooked to. * - function-name is the hooked function name. * - priority is the priority of the hooked function. * * @since 9.5.0 * @param array $data Additional hooked data. Default to empty */ $additional_hook_data = apply_filters( 'woocommerce_blocks_hook_compatibility_additional_data', array() ); if ( empty( $additional_hook_data ) || ! is_array( $additional_hook_data ) ) { return; } foreach ( $additional_hook_data as $data ) { if ( ! isset( $data['hook'], $data['function'], $data['priority'] ) ) { continue; } remove_action( $data['hook'], $data['function'], $data['priority'] ); } } /** * Get the buffer content of the hooks to append/prepend to render content. * * @param array $hooks The hooks to be rendered. * @param string $position The position of the hooks. * * @return string */ protected function get_hooks_buffer( $hooks, $position ) { ob_start(); foreach ( $hooks as $hook => $data ) { if ( $data['position'] === $position ) { /** * Action to render the content of a hook. * * @since 9.5.0 */ do_action( $hook ); } } return ob_get_clean(); } }
Fatal error: Uncaught Error: Class "Automattic\WooCommerce\Blocks\Templates\AbstractTemplateCompatibility" not found in /htdocs/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Templates/ArchiveProductTemplatesCompatibility.php:11 Stack trace: #0 /htdocs/wp-content/plugins/jetpack/vendor/jetpack-autoloader/class-php-autoloader.php(90): require() #1 /htdocs/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Domain/Bootstrap.php(285): Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackā“„12_4\PHP_Autoloader::load_class('Automattic\\WooC...') #2 /htdocs/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Registry/AbstractDependencyType.php(42): Automattic\WooCommerce\Blocks\Domain\Bootstrap->Automattic\WooCommerce\Blocks\Domain\{closure}(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #3 /htdocs/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Registry/SharedType.php(28): Automattic\WooCommerce\Blocks\Registry\AbstractDependencyType->resolve_value(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #4 /htdocs/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Registry/Container.php(96): Automattic\WooCommerce\Blocks\Registry\SharedType->get(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #5 /htdocs/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Domain/Bootstrap.php(135): Automattic\WooCommerce\Blocks\Registry\Container->get('Automattic\\WooC...') #6 /htdocs/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Domain/Bootstrap.php(75): Automattic\WooCommerce\Blocks\Domain\Bootstrap->init() #7 /htdocs/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Package.php(125): Automattic\WooCommerce\Blocks\Domain\Bootstrap->__construct(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #8 /htdocs/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Registry/AbstractDependencyType.php(42): Automattic\WooCommerce\Blocks\Package::Automattic\WooCommerce\Blocks\{closure}(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #9 /htdocs/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Registry/SharedType.php(28): Automattic\WooCommerce\Blocks\Registry\AbstractDependencyType->resolve_value(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #10 /htdocs/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Registry/Container.php(96): Automattic\WooCommerce\Blocks\Registry\SharedType->get(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #11 /htdocs/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Package.php(44): Automattic\WooCommerce\Blocks\Registry\Container->get('Automattic\\WooC...') #12 [internal function]: Automattic\WooCommerce\Blocks\Package::init() #13 /htdocs/wp-content/plugins/woocommerce/src/Packages.php(71): call_user_func(Array) #14 /htdocs/wp-content/plugins/woocommerce/src/Packages.php(44): Automattic\WooCommerce\Packages::load_packages() #15 /htdocs/wp-includes/class-wp-hook.php(310): Automattic\WooCommerce\Packages::on_init('') #16 /htdocs/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array) #17 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #18 /htdocs/wp-settings.php(495): do_action('plugins_loaded') #19 /htdocs/wp-config.php(96): require_once('/htdocs/wp-sett...') #20 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #21 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #22 /htdocs/index.php(17): require('/htdocs/wp-blog...') #23 {main} thrown in /htdocs/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Templates/ArchiveProductTemplatesCompatibility.php on line 11