target_widget_settings = $settings; $this->target_widget_name = $widget_name; } /** * Render a single product item specifically for the Glossy Grid widget * * @param WC_Product $product The product object to render * @param array $settings The widget settings */ public function render_glossy_grid_item($product, $settings) { if (!$product) { return; } $product_id = $product->get_id(); $rating_count = $product->get_rating_count(); $average = $product->get_average_rating(); // Get product categories $tooltip_position = isset($settings['tooltip_position']) ? $settings['tooltip_position'] : 'right'; // get the class based on the widget $show_rating = isset($settings['show_rating']) ? $settings['show_rating'] : true; $classes = $this->target_widget_name === 'glossy-grid' ? 'usk-item' : 'usk-item swiper-slide'; $classes .= $show_rating ? ' usk-have-rating' : ''; $title_tags = isset($settings['title_tags']) ? $settings['title_tags'] : 'h3'; ?>