get_gallery_image_ids(); $post_thumbnail = has_post_thumbnail(); $thumb_count = count( $attachment_ids ); if ( $post_thumbnail ) $thumb_count++; // Disable thumbnails if there is only one extra image. if ( $post_thumbnail && $thumb_count == 1 ) { return; } $rtl = 'false'; $thumb_cell_align = 'left'; if ( is_rtl() ) { $rtl = 'true'; $thumb_cell_align = 'right'; } if ( $attachment_ids ) { $loop = 0; $image_size = 'thumbnail'; $gallery_class = array( 'product-thumbnails', 'thumbnails' ); // Check if custom gallery thumbnail size is set and use that. $image_check = wc_get_image_size( 'gallery_thumbnail' ); if ( $image_check['width'] !== 100 ) { $image_size = 'gallery_thumbnail'; } $gallery_thumbnail = wc_get_image_size( apply_filters( 'woocommerce_gallery_thumbnail_size', 'woocommerce_' . $image_size ) ); if ( $thumb_count < 5 ) { $gallery_class[] = 'slider-no-arrows'; } $gallery_class[] = 'slider row row-small row-slider slider-nav-small small-columns-4'; ?>