I recently bought a Go Market ecommerce theme from themeforest. All were good, but suddenly when I go to wp-admin page it shows this error:
Call to a member function get_cart() on null in /home/amarmart/public_html/wp-content/themes/wp_woo_gomarket/framework/functions/woo-cart.php on line 9
Here is the related woo-cart.php
PHP file code:
<?php
if ( ! function_exists( 'wd_tini_cart' ) ) {
function wd_tini_cart(){
$_actived = apply_filters( 'active_plugins', get_option( 'active_plugins' ) );
if ( !in_array( "woocommerce/woocommerce.php", $_actived ) ) {
return;
}
global $woocommerce;
/*LINE NO- 9*/ $_cart_empty = sizeof( $woocommerce->cart->get_cart() ) > 0 ? false : true ;
ob_start();
?>
<?php do_action( 'wd_before_tini_cart' ); ?>
<div class="wd_tini_cart_wrapper">
<div class="wd_tini_cart_control ">
<span class="cart_size">
<a href="<?php echo $woocommerce->cart->get_cart_url();?>" title="<?php _e('View your shopping bag','wpdance');?>">
<span><?php _e('my cart','wpdance');?> </span>
</a>
: <!--<span class="cart_subtotal"><?php echo $woocommerce->cart->get_cart_subtotal(); ?></span>
<span class="cart_division">/</span>-->
(<span id="cart_size_value_head"><?php echo $woocommerce->cart->cart_contents_count;?></span>)</span>
</div>
I am confused that, what is the connection between cart page and wp-admin login page?
What should be the solution or reason?
Can anyone help me with that issue...
Thanks.