woocommerce->is_product_in_cart( $id ); $size = 'woocommerce_thumbnail'; } $first_image_id = ''; $attachment_image = ''; if ( true === $is_product && Avada()->settings->get( 'woocommerce_disable_crossfade_effect' ) ) { $gallery = get_post_meta( $id, '_product_image_gallery', true ); if ( ! empty( $gallery ) ) { $gallery = explode( ',', $gallery ); $first_image_id = $gallery[0]; } } else { $first_image_id = fusion_get_featured_image_id( 'featured-image-2' ); } if ( $first_image_id ) { $attachment_image = wp_get_attachment_image( $first_image_id, $size, false, [ 'class' => 'hover-image', ] ); } $thumb_image = get_the_post_thumbnail( $id, $size ); if ( ! $thumb_image && function_exists( 'wc_placeholder_img_src' ) && wc_placeholder_img_src() ) { $thumb_image = wc_placeholder_img( $size ); } $classes = apply_filters( 'awb_crossfade_image_classes', [ 'featured-image' ], $attachment_image ); if ( $attachment_image ) { $classes[] = 'crossfade-images'; } ?>