HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //var/www/html/bwcdev/wp-content/themes/salient/includes/partials/header/woo-slide-in-cart.php
<?php
/**
 * WooCommerce slide in cart
 *
 * @package    Salient WordPress Theme
 * @subpackage Partials
 * @version 10.5
 */

// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

global $post;
global $woocommerce;

$nectar_options = get_nectar_theme_options();
$nav_cart_style = ( ! empty( $nectar_options['ajax-cart-style'] ) ) ? $nectar_options['ajax-cart-style'] : 'default';

if ( $woocommerce && $nav_cart_style === 'slide_in' ) {
	
	echo '<div class="nectar-slide-in-cart">';
	// Check for WooCommerce 2.0 and display the cart widget
	if ( version_compare( WOOCOMMERCE_VERSION, '2.0.0' ) >= 0 ) {
		the_widget( 'WC_Widget_Cart' );
	} else {
		the_widget( 'WooCommerce_Widget_Cart', 'title= ' );
	}
	echo '</div>';
	
}