.= ' wc-block-woocommerce-product-gallery-large-image__image--hoverZoom'; $attributes['data-wc-bind--style'] = 'state.styles'; } $main_images = ProductGalleryUtils::get_product_gallery_images( $product_id, 'full', $attributes, 'wc-block-product-gallery-large-image__image-element', $context['cropImages'] ); $main_image_with_wrapper = array_map( function( $main_image_element ) { return "'; }, $main_images ); $visible_main_image = array_shift( $main_images ); return array( $visible_main_image, $main_image_with_wrapper ); } /** * Get directives for the block. * * @param array $block_context The block context. * * @return array */ private function get_directives( $block_context ) { return array_merge( $this->get_zoom_directives( $block_context ), $this->get_open_dialog_directives( $block_context ) ); } /** * Get directives for zoom. * * @param array $block_context The block context. * * @return array */ private function get_zoom_directives( $block_context ) { if ( ! $block_context['hoverZoom'] ) { return array(); } $context = array( 'styles' => array( 'transform' => 'scale(1.0)', 'transform-origin' => '', ), ); return array( 'data-wc-interactive' => wp_json_encode( array( 'namespace' => 'woocommerce/product-gallery' ) ), 'data-wc-context' => wp_json_encode( $context, JSON_NUMERIC_CHECK ), 'data-wc-on--mousemove' => 'actions.startZoom', 'data-wc-on--mouseleave' => 'actions.resetZoom', ); } /** * Get directives for opening the dialog. * * @param array $block_context The block context. * * @return array */ private function get_open_dialog_directives( $block_context ) { if ( ! $block_context['fullScreenOnClick'] ) { return array(); } return array( 'data-wc-on--click' => 'actions.openDialog', ); } }
Fatal error: Uncaught Error: Class "Automattic\WooCommerce\Blocks\BlockTypes\ProductGalleryLargeImage" not found in /htdocs/wp-content/plugins/woocommerce/src/Blocks/BlockTypesController.php:106 Stack trace: #0 /htdocs/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Blocks\BlockTypesController->register_blocks('') #1 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #2 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #3 /htdocs/wp-settings.php(704): do_action('init') #4 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #5 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #6 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #7 /htdocs/index.php(17): require('/htdocs/wp-blog...') #8 {main} thrown in /htdocs/wp-content/plugins/woocommerce/src/Blocks/BlockTypesController.php on line 106