Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • [I FOUND A SOLUTION (code editing)] – It Will be erased if you update plugin

    I had the same problem in a website with 3 languages.

    The solution with the shortcode was not working.

    The plugin is not compatible with WPML and i belive it will not translate event for other translating plugin.

    The solution i found is editing the file : \wp-content\plugins\eu-vat-for-woocommerce\includes\class-alg-wc-eu-vat-core.php

    In the line 414 add this code to select a string for each lang, for example (french, english, german) :

    $current_lang 		= get_locale();
    switch ($current_lang) {
    			case 'fr_FR': $labelCorrectLang = 'Numéro de TVA EU'; break;
    			case 'en_US': $labelCorrectLang = 'EU VAT Number'; break;
    			case 'de_DE': $labelCorrectLang = 'Umsatzsteuer-Identifikationsnummer (EU VAT)'; break;
    			default: $labelCorrectLang = do_shortcode( get_option( 'alg_wc_eu_vat_field_label', __( 'EU VAT Number', 'eu-vat-for-woocommerce' ) ) );
    		}

    And just after that, inside the returned array, you put you variable into the label field

    'label' => $labelCorrectLang ,

    • This reply was modified 2 years, 8 months ago by doncrystal.
    • This reply was modified 2 years, 8 months ago by doncrystal.
    • This reply was modified 2 years, 8 months ago by doncrystal.
    • This reply was modified 2 years, 8 months ago by doncrystal.
    • This reply was modified 2 years, 8 months ago by doncrystal.
    Thread Starter doncrystal

    (@doncrystal)

    Hi Igor

    This is a screen for my woocommerce status:
    https://ibb.co/xqZryYp

    and here a screen for my VAT setting:
    https://ibb.co/Hhtj39L

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