Exclude template part from cache
-
I’m using Woocommerce along with WPML. Everything is ok when cache is enabled, apart form a mini cart used with the cart icon in the main menu, including items in the cart and link to the cart page: switching from one language to the other, the language of mini cart content gets wrong. The code is added with a function that includes the mini-cart template from the child theme (something like get_template_part( ‘tpls/wc-mini-cart’ )).
I wonder if there’s a way to exclude that template part from being cached even in the cached pages (the Woocommerce pages are not cached by default so the mini cart works properly in them). Any suggestion on how to fix that will be appreciated.
Thanks a lot.
- The topic ‘Exclude template part from cache’ is closed to new replies.