Home Forums WoodMart support forum Dokan Store sidebar and Geo Maps not working Reply To: Dokan Store sidebar and Geo Maps not working

#310361

Artem Temos
Keymaster

This error is not related to your problem and will be fixed in our next theme update. You can fix it now by adding the following code to the functions.php file in the child theme

function woodmart_cart_count() {
		if ( ! is_object( WC() ) || ! property_exists( WC(), 'cart' ) ) {
			return;
		}
		$count = WC()->cart->get_cart_contents_count();
		?>
			<span class="wd-cart-number<?php echo woodmart_get_old_classes( ' woodmart-cart-number' ); ?>"><?php echo esc_html( $count ); ?> <span><?php echo esc_html( _n( 'item', 'items', $count, 'woodmart' ) ); ?></span></span>
		<?php
	}

Kind Regards