• Resolved leemon

    (@leemon)


    Hi,

    I’m trying to integrate WooCommerce and Polylang (a multilingual plugin) and I’m stuck in getting the Checkout page translated.

    I’m using the following code in my functions.php file:

    if (function_exists('pll_get_post')){ // is Polylang activated?
        add_filter('woocommerce_get_cart_page_id', 'pll_woocommerce_get_cart_page_id');
        add_filter('woocommerce_get_checkout_page_id', 'pll_woocommerce_get_checkout_page_id');
        function pll_woocommerce_get_cart_page_id($id) {
            return pll_get_post($id); // translate the page to current language
        }
        function pll_woocommerce_get_checkout_page_id($id) {
            return pll_get_post($id); // translate the page to current language
        }
    }

    I get the correct Cart page in every language, but for some reason, the Checkout one is not working, and I’m getting a blank page in return.

    Any ideas?

    https://www.ads-software.com/plugins/woocommerce/

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WooCommerce Polylang’ is closed to new replies.