Allow translation for “alg_wc_eu_vat_field_confirmation_text”
-
Hello,
I notice that the “alg_wc_eu_vat_field_confirmation_text” field is not translatable. I took the liberty of taking a little look at the code.
Here is the function where the field should be translate (in class-alg-c-eu-vat-core.php at 88) :
function add_place_order_button_confirmation_script() { if ( function_exists( 'is_checkout' ) && is_checkout() ) { wp_enqueue_script( 'alg-wc-eu-vat-place-order', trailingslashit( alg_wc_eu_vat()->plugin_url() ) . 'includes/js/alg-wc-eu-vat-place-order.js', array( 'jquery' ), alg_wc_eu_vat()->version, true ); wp_localize_script( 'alg-wc-eu-vat-place-order', 'place_order_data', array( 'confirmation_text' => <strong>get_option('alg_wc_eu_vat_field_confirmation_text',__( 'You didn\'t set your VAT ID. Are you sure you want to continue?', 'eu-vat-for-woocommerce' ) )</strong> ) ); } }
Here’s a solution to fix this problem, can you take a look at it and add it in a future update if you think it’s correct:
function add_place_order_button_confirmation_script() { if ( function_exists( 'is_checkout' ) && is_checkout() ) { wp_enqueue_script( 'alg-wc-eu-vat-place-order', trailingslashit( alg_wc_eu_vat()->plugin_url() ) . 'includes/js/alg-wc-eu-vat-place-order.js', array( 'jquery' ), alg_wc_eu_vat()->version, true ); wp_localize_script( 'alg-wc-eu-vat-place-order', 'place_order_data', array( 'confirmation_text' => <strong>do_shortcode( get_option( 'alg_wc_eu_vat_field_confirmation_text', __( 'EU VAT Number', 'eu-vat-for-woocommerce' ) )</strong> ) ) ); } }
I hope it can be useful ??
Kind regards,
Sébastien
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Allow translation for “alg_wc_eu_vat_field_confirmation_text”’ is closed to new replies.