';
$output .= '
';
$output .= '
';
if ( wc_review_ratings_enabled() ) {
$output .= wc_get_rating_html( $average, $rating_count );
}
$output .= '
' . $product->get_price_html() . '
';
$output .= '
' . do_shortcode( $product->get_short_description() ) . '
';
$output .= '
' . esc_html( $args['text'] ) . '';
$output .= '
';
}
if ( $hotspot_type == 'text' && ( $title || $content || $link_text ) ) {
if ( $link ) {
$attributes = woodmart_get_link_attributes( $link );
}
$image = woodmart_otf_get_image_html( $img, $img_size, array(), array( 'class' => 'wd-image-hotspot-img' ) );
$image_allowed_tags = array(
'img' => array(
'width' => true,
'height' => true,
'src' => true,
'alt' => true,
'data-wood-src' => true,
'data-srcset' => true,
'class' => true,
),
);
$output = '';
if ( $image ) {
$output .= '
' . wp_kses( $image, $image_allowed_tags ) . '
';
}
if ( $title ) {
$output .= '
' . esc_html( $title ) . '
';
}
if ( $content ) {
$output .= '
' . $content . '
';
}
if ( $link_text && $link ) {
$output .= '
' . esc_html( $link_text ) . '';
}
$output .= '
';
}
if ( ! $output ) {
return;
}
echo '' . esc_html__( 'You need to upload an image for the parent element first.', 'woodmart' ) . '
',
);
echo json_encode( $response );
die();
}
$response = array(
'status' => 'success',
'html' => $html,
);
echo json_encode( $response );
die();
}
add_action( 'wp_ajax_woodmart_get_hotspot_image', 'woodmart_get_hotspot_image' );
}