<?php 
    echo wkp_check_and_show_alert_for_dependent_plugin('woocommerce', 'woocommerce.php', 'free');

    if(wkp_check_dependent_plugin('woocommerce', 'woocommerce.php')):
        /**
         * check if single product page 
         * and single page
         */
        if( is_product() ):
            ?>
            <?php
                $product = wc_get_product( get_the_ID() );
                $type = $product->get_type();
                $price = $product->get_price_html();
                $get_manage_stock = $product->get_manage_stock();
                $get_stock_quantity = $product->get_stock_quantity();
                $get_stock_status = $product->get_stock_status();
                $get_sku = $product->get_sku();
            ?>
            <div class="cart-button-wrapper <?php echo 'type-'.$type; ?>">
                <?php
                    if('grouped' === $type){
                        echo do_action('woocommerce_grouped_add_to_cart');
                    }elseif ('variable' === $type) {
                        echo do_action('woocommerce_variable_add_to_cart');
                    }elseif('external' === $type){
                        echo do_action('woocommerce_external_add_to_cart'); 
                    }elseif('simple' === $type){
                        echo do_action('woocommerce_simple_add_to_cart'); 
                    }
                ?>
            </div>
            <?php   
        else:
            echo '<h2 style="border:solid 5px red; padding:30px;">This element only works for WooCommerce Single Product Page</h2>';
        endif;
    endif;
?>