• Resolved pauti12

    (@pauti12)


    Hello,
    I’d need some help with this because I’ve trying for weeks.
    I am trying to translate wooccommerce into 2 languages. I’ve managed to translate the shop and the products, but the checkout and cart are still in the original language (English).
    I am using this plugin: Woocommerce Polylang Integration, but it seems not to be working.
    I added this code to my functions.php, but doesn’t work:

    function get_woocommerce_cart_polylang()
    {
        return pll_get_post(get_option('woocommerce_cart_page_id' ) );
    }
    add_filter('woocommerce_cart_shop_page_id', "get_woocommerce_cart_polylang");
    
    function get_woocommerce_shop_polylang()
    {
        return pll_get_post(get_option('woocommerce_shop_page_id' ) );
    }
    add_filter('woocommerce_get_shop_page_id', "get_woocommerce_shop_polylang");
    
    function get_woocommerce_checkout_polylang()
    {
        return pll_get_post(get_option('woocommerce_checkout_page_id' ) );
    }
    add_filter('woocommerce_checkout_page_id', "get_woocommerce_checkout_polylang");

    Can anyone point me in the right direction?
    I must use a free plugin.

    Thank you

Viewing 1 replies (of 1 total)
  • Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    I’m not too familiar with Polylang and the WooCommerce integration. I think you should get in contact with the plugin authors for the Polylang integration in that support forum.

Viewing 1 replies (of 1 total)
  • The topic ‘Translate Cart and Checkout’ is closed to new replies.