jtb0 on "[Plugin: Max Mega Menu] woocommerce_widget_cart-2 entry in menu instead of cart items"

ساخت وبلاگ

Hi,

I created a simple cart entry in the menu with a cart icon and the text cart. At the mega menu configuration screen for the menu entry I added the widget Woocommerce cart.

This works well until I hoover over the menu at the checkout process. If I do this the menu shows a entry woocommerce_widget_cart-2 instead of the items in the cart.

I think this could be a bug.

regards,
jtb0

https://wordpress.org/plugins/megamenu/

Hi jtb0,

This is because the WooCommerce widget tries to hide itself on the cart page. To stop that from happening please add this to your themes functions.php file:

add_filter( 'woocommerce_widget_cart_is_hidden', 'always_show_cart', 40, 0 );
function always_show_cart() { retu false;
}

Regards,
Tom

Hi Tom,

thank you very much! This solved the Problem!

You are great! :-)

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 291 تاريخ : پنجشنبه 7 مرداد 1395 ساعت: 1:29