Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Fix the problem by changing the

    add_filter('woocommerce_get_shop_page_id', 'pll_woocommerce_get_shop_page_id');
    function pll_woocommerce_get_shop_page_id($id) {
                return pll_get_post($id); // translate the page to current language
            }

    My problem now is that the products are shown only in /wp/en/products page, the translated page /wp/de/produkte doesn’t showing them. And in Woocommerce plugin I have only one page as option, in this case my products page. Is there any workaround for this problem?

    Thanks!

    Hello,

    I used the code of BowsDesign which worked perfectly. I am trying to add a filter for products listings now, but somehow doesn’t work as expected.

    add_filter('woocommerce_get_products_page_id', 'pll_woocommerce_get_products_page_id');
    function pll_woocommerce_get_products_page_id($id) {
                return pll_get_post($id); // translate the page to current language
            }

    I have a product page under /wp/en/products and a translation /wp/de/produkte
    When going to Cart and pressing back to Products I always end up on the /wp/en/products.

Viewing 2 replies - 1 through 2 (of 2 total)