<?php
/**
 * Gallery content
 *
 * @package wpstream-theme
 */

global $product;
global $post;
if( function_exists('wc_get_product') ){
	$product = wc_get_product();
}
?>

<?php if ( $product ) : ?>
	<?php if ( $product->get_gallery_image_ids() ) : ?>
		<div class="wpstream-gallery-section  mb-60">

			<?php
			// Display the gallery with the custom function.
			echo wpstream_theme_image_gallery( $post->ID );//phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
			?>

		</div>
	<?php endif; ?>

<?php else : ?>
    <div class="wpstream-gallery-section  mb-60">
        <?php
        // Display the gallery with the custom function.
        echo wpstream_theme_image_gallery( $post->ID );//phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
        ?>
    </div>
<?php endif; ?>
