' . esc_html( $product->get_name() ) . ''; } if ( ! empty( $modules['rating'] ) && $product->get_rating_count() ) { $html .= '
' . wp_kses_post( wc_get_rating_html( $product->get_average_rating(), $product->get_rating_count() ) ) . '
'; } if ( ! empty( $modules['price'] ) ) { $html .= '
' . wp_kses_post( $product->get_price_html() ) . '
'; } if ( ! empty( $modules['availability'] ) ) { $stock = wc_get_stock_html( $product ); if ( $stock ) { $html .= '

' . wp_kses_post( $stock ) . '

'; } } if ( ! empty( $modules['short_description'] ) && $product->get_short_description() ) { $html .= '
' . wp_kses_post( wpautop( $product->get_short_description() ) ) . '
'; } $before_purchase = $html; if ( ! empty( $modules['purchase'] ) && $product->is_purchasable() ) { ob_start(); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- WooCommerce documents this product-type-specific add-to-cart hook. do_action( 'woocommerce_' . $product->get_type() . '_add_to_cart' ); $form = ob_get_clean(); if ( $form ) { if ( $preview ) { $form = preg_replace( '/\saction=(["\']).*?\1/i', ' action="#"', $form ); $form = str_ireplace( array( 'get_type() ) . '">' . $form . ''; } else { $html .= '
' . $form . '
'; } } } if ( ! empty( $modules['divider'] ) && '' !== trim( $before_purchase ) && preg_match( '/artbees-qv__purchase/', $html ) ) { $html = $before_purchase . '
' . substr( $html, strlen( $before_purchase ) ); } if ( ! empty( $modules['sku'] ) && $product->get_sku() ) { $html .= '

' . esc_html__( 'SKU:', 'artbees-quick-view' ) . ' ' . esc_html( $product->get_sku() ) . '

'; } if ( ! empty( $modules['terms'] ) ) { $html .= '
' . wp_kses_post( wc_get_product_category_list( $product->get_id() ) ) . '
'; } if ( ! empty( $modules['attributes'] ) && $product->has_attributes() ) { ob_start(); wc_display_product_attributes( $product ); $attrs = ob_get_clean(); if ( $attrs ) { $html .= '
' . wp_kses_post( $attrs ) . '
'; } } if ( ! empty( $modules['details_link'] ) ) { if ( $preview ) { $html .= '

' . esc_html( $settings['labels']['details'] ) . '

'; } else { $html .= '

' . esc_html( $settings['labels']['details'] ) . '

'; } } return $html; } }