<?php
/**
 * The sidebar containing the main widget area
 *
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 *
 * @package Sparta
 */
?>
<div class="vk-sidebar vk-sidebar-blog">
    <?php
    global $woocommerce;

    if (class_exists('WooCommerce') && $woocommerce && is_shop() || $woocommerce && is_product() || $woocommerce && is_product_category() || $woocommerce && is_product_tag()) {
        if (is_active_sidebar('sidebar-woo')):
            dynamic_sidebar('sidebar-woo');
        endif;

    } else {
        if (is_active_sidebar('sidebar-1')):
            dynamic_sidebar('sidebar-1');
        endif;

    }
    ?>
</div><!--./vk-sidebar-blog-->
