woooo

if (function_exists('pll_get_post') ) { 
  add_filter( 'woocommerce_get_checkout_page_id', 'pll_woocommerce_get_page_id' ); 
  add_filter( 'woocommerce_get_cart_page_id', 'pll_woocommerce_get_page_id' ); 
  add_filter( 'woocommerce_get_myaccount_page_id', 'pll_woocommerce_get_page_id' ); 
  add_filter( 'woocommerce_get_edit_address_page_id', 'pll_woocommerce_get_page_id' ); 
  add_filter( 'woocommerce_get_view_order_page_id', 'pll_woocommerce_get_page_id' ); 
  add_filter( 'woocommerce_get_change_password_page_id', 'pll_woocommerce_get_page_id' ); 
  add_filter( 'woocommerce_get_thanks_page_id', 'pll_woocommerce_get_page_id' ); 
  add_filter( 'woocommerce_get_shop_page_id', 'pll_woocommerce_get_page_id' ); 
  add_filter( 'woocommerce_get_terms_page_id', 'pll_woocommerce_get_page_id' ); 
  add_filter( 'woocommerce_get_pay_page_id', 'pll_woocommerce_get_page_id' ); 
  function pll_woocommerce_get_page_id( $id ) { 
    return pll_get_post( $id ); 
  } 
}