• I have coded with the following script so that it could be able to find the string translation under WPML. However, it doesn’t like generic woocommerce_states, the cities cannot be translated accounting to the theme language. It stores the translated value instead of the original value into the SQL.

    Would you please advise how to fix it?

    2nd question is it doesn’t read the SQL while user trying to edit the address in MYACCOUNT.

    ===
    function my_cities( $cities ) {
    $cities[‘HK’] = array(
    ‘KOWLOON’ => array(
    __(‘Cheung Sha Wan’),
    __(‘Choi Hung’),
    ===

    ===
    add_filter( ‘woocommerce_states’, ‘custom_woocommerce_states’ );

    function custom_woocommerce_states( $states ) {

    $states[‘HK’] = array(
    ‘HONG KONG’ => __(‘HONG KONG’),
    ‘KOWLOON’ => __(‘KOWLOON’),
    ‘NEW TERRITORIES’ => __(‘NEW TERRITORIES’),
    ‘OUTLYING ISLAND’ => __(‘OUTLYING ISLAND’),
    );

    return $states;
    }
    ===

Viewing 1 replies (of 1 total)
  • Plugin Author mantish

    (@mantish)

    Hi,
    I’m not really familiar with WPML…but I think some changes would be needed so the plugin supports translations, I don;t know exactly how to…
    Please let us know if you manage to make it work.

Viewing 1 replies (of 1 total)
  • The topic ‘WPML support by MYACCOUNT page’ is closed to new replies.