Home Forums WoodMart support forum Technical problem message from WordPress

Technical problem message from WordPress

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #311075

    italyana
    Participant

    Hello,

    I’ve just received a weird message from my website and I don’t understand what kind of problem could be.

    The message says that WordPress detected an error on my Theme, Woodmart.

    Can you help me?

    Best regards
    Andrea

    #311087

    Artem Temos
    Keymaster

    Hello,

    This error 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

    #311188

    italyana
    Participant

    Thank you!

    Best regards
    Andrea

    #311496

    Artem Temos
    Keymaster

    You are welcome!

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Technical problem message from WordPress’ is closed to new replies.