WPML

Overview of the Issue

When using Easy Digital Downloads – EU VAT with WPML, the company name and address from the settings show in the default language on translated purchase receipts and in the email tags.

Workaround

  1. Go to WPMLSettingsCustom XML Configuration, add the following XML and save:
    XML
    <wpml-config>
      <admin-texts>
        <key name="edd_settings">
          <key name="edd_vat_company_name" />
          <key name="edd_vat_address_line_1" />
          <key name="edd_vat_address_line_2" />
          <key name="edd_vat_address_city" />
        </key>
      </admin-texts>
    </wpml-config>
  2. Add this code to your theme’s functions.php file:
    PHP
    add_filter( 'edd_get_option', function ( $value, $key ) {
        if ( is_string( $value ) && 0 === strpos( $key, 'edd_vat_' ) ) {
            return apply_filters( 'wpml_translate_single_string', $value, 'admin_texts_edd_settings', '[edd_settings]' . $key );
        }
        return $value;
    }, 10, 2 );
  3. Translate the company name and address in WPMLString Translation.

All known issues

Need Help with This Issue?

Ask a support question and we’ll look into it with you.