Support

Account

Home Forums General Issues Getting translated select options using Polylang

Unread

Getting translated select options using Polylang

  • Hi,

    I have two select options (choices) let’s say London and Paris, these are being translated using Polylang. I’m using the GET method to create my query string based on the selected city.

    This creates a query string like: location=london&category=138&date=.

    Later on in the code I’m using this query string to create meta data sent to the back-end of WooCommerce using various methods such as:

    if(!empty($_SESSION['location'])){
          
            $item->update_meta_data( __( 'City', 'childtheme' ), $_SESSION['location'] );
        }

    The issue I’m having if the language is switched after the GET method, when the original search is executed my location values in the query string don’t update. So I’m looking to produce this:

    location=londres&category=138&date=

    How do I solve this issue, does anybody use ACF with Polylang who has had a similar issue? I appreciate it may be more of a Polylang issue.

    Thanks for looking.

    Chris

Viewing 1 post (of 1 total)

The topic ‘Getting translated select options using Polylang’ is closed to new replies.