Woocommerce Multilanguage top-cart-widget not updating subtotal on lang change

This topic has 2 replies, 2 voices, and was last updated 10 years ago ago by Eva Kemp

  • Avatar: b.dokimakis
    b.dokimakis
    Participant
    November 14, 2014 at 03:11

    Reproduce:

    Lets say you have English as basic language, and set woocommerce multilanguage (wpml) to set currency to rubles when visitor switches to Russian.

    1) You switch to Russian. You see all the prices in rubles.
    2) You put an item in your cart.
    3) You switch back to English.

    Top cart widget subtotal is not updated, although currency and item prices are.

    Solution (maybe not the best, but worked for me):

    add_action(‘wp_head’, ‘update_woocommerce_cart’);
    function update_woocommerce_cart() {
    global $woocommerce;
    $woocommerce->cart->calculate_totals();
    }

    Please, contact administrator
    for this information.
    1 Answer
    Avatar: Eva
    Eva Kemp
    Support staff
    November 14, 2014 at 15:22

    Hello,

    Thank you for sharing the solution.
    If you have any questions concerning the theme please let us know.

    Have a nice day.

    Regards,
    Eva Kemp.

  • Viewing 2 results - 1 through 2 (of 2 total)

The issue related to '‘Woocommerce Multilanguage top-cart-widget not updating subtotal on lang change’' has been successfully resolved, and the topic is now closed for further responses

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.