Technical problem message from WordPress
-
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
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
Thank you!
Best regards
Andrea
The topic ‘Technical problem message from WordPress’ is closed to new replies.