es() Render error notices (priority 10) * @see woocommerce_result_count() Show number of results found (priority 20) * @see woocommerce_catalog_ordering() Show form to control sort order (priority 30) * * @since 6.3.0 */ do_action( 'woocommerce_before_shop_loop' ); woocommerce_product_loop_start(); if ( wc_get_loop_prop( 'total' ) ) { while ( have_posts() ) { the_post(); /** * Hook: woocommerce_shop_loop. * * @since 6.3.0 */ do_action( 'woocommerce_shop_loop' ); wc_get_template_part( 'content', 'product' ); } } woocommerce_product_loop_end(); /** * Hook: woocommerce_after_shop_loop. * * @see woocommerce_pagination() Renders pagination (priority 10) * * @since 6.3.0 */ do_action( 'woocommerce_after_shop_loop' ); } else { /** * Hook: woocommerce_no_products_found. * * @see wc_no_products_found() Default no products found content (priority 10) * * @since 6.3.0 */ do_action( 'woocommerce_no_products_found' ); } /** * Hook: woocommerce_after_main_content * * Called after rendering the main content for a product. * * @see woocommerce_output_content_wrapper_end() Outputs closing DIV for the content (priority 10) * * @since 6.3.0 */ do_action( 'woocommerce_after_main_content' ); wp_reset_postdata(); return ob_get_clean(); } /** * Get HTML markup with the right classes by attributes. * This function appends the classname at the first element that have the class attribute. * Based on the experience, all the wrapper elements have a class attribute. * * @param string $content Block content. * @param array $block Parsed block data. * @return string Rendered block type output. */ public function add_alignment_class_to_wrapper( string $content, array $block ) { if ( ( 'woocommerce/' . $this->block_name ) !== $block['blockName'] ) { return $content; } $attributes = (array) $block['attrs']; // Set the default alignment to wide. if ( ! isset( $attributes['align'] ) ) { $attributes['align'] = 'wide'; } $align_class_and_style = StyleAttributesUtils::get_align_class_and_style( $attributes ); if ( ! isset( $align_class_and_style['class'] ) ) { return $content; } // Find the first tag. $first_tag = '<[^<>]+>'; $matches = array(); preg_match( $first_tag, $content, $matches ); // If there is a tag, but it doesn't have a class attribute, add the class attribute. if ( isset( $matches[0] ) && strpos( $matches[0], ' class=' ) === false ) { $pattern_before_tag_closing = '/.+?(?=>)/'; return preg_replace( $pattern_before_tag_closing, '$0 class="' . $align_class_and_style['class'] . '"', $content, 1 ); } // If there is a tag, and it has a class already, add the class attribute. $pattern_get_class = '/(?<=class=\"|\')[^"|\']+(?=\"|\')/'; return preg_replace( $pattern_get_class, '$0 ' . $align_class_and_style['class'], $content, 1 ); } /** * Get the frontend style handle for this block type. * * @return null */ protected function get_block_type_style() { return null; } }
Fatal error: Uncaught Error: Class 'Automattic\WooCommerce\Blocks\BlockTypes\ClassicTemplate' not found in /home/merciket/public_html/wp-content/plugins/woocommerce/src/Blocks/BlockTypesController.php:106 Stack trace: #0 /home/merciket/public_html/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Blocks\BlockTypesController->register_blocks('') #1 /home/merciket/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #2 /home/merciket/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #3 /home/merciket/public_html/wp-settings.php(643): do_action('init') #4 /home/merciket/public_html/wp-config.php(92): require_once('/home/merciket/...') #5 /home/merciket/public_html/wp-load.php(50): require_once('/home/merciket/...') #6 /home/merciket/public_html/wp-blog-header.php(13): require_once('/home/merciket/...') #7 /home/merciket/public_html/index.php(17): require('/home/merciket/...') #8 {main} thrown in /home/merciket/public_html/wp-content/plugins/woocommerce/src/Blocks/BlockTypesController.php on line 106