Background of the issue:
I would like to translate a text added in the function php. I've read that you need to provide the text with gettext function. This is the extra code in the function php:
//international posting cart message
function add_checkout_notice() {
}
add_action( 'woocommerce_review_order_before_submit', 'show_checkout_notice', 10 ); //remove if you do not want to show it on the checkout page
if( !in_array( WC()->customer->shipping_country, $msg_states ) ) {
echo ' Please Note: As we ship from the EU, International orders (outside the EU) may incur additional custom, VAT and tax charges for which we are not responsible for.';
}
}
?>
Symptoms:
I have no programming knowledge and don't know where to put the _() function.
Questions:
Can you help me understand where to put the _() function in my PHP code to translate the text?
Gestione del consenso per i cookie
Utilizziamo i cookie per ottimizzare il nostro sito web e i nostri servizi.
Il tuo consenso ci permette di elaborare dati come il comportamento di navigazione.
Il mancato consenso potrebbe compromettere alcune funzionalità.
Funzionale
Sempre attivo
Necessario affinché il nostro sito web funzioni e comunichi correttamente.
Preferenze
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistiche
Li utilizziamo per analizzare le statistiche del nostro sito.
Le informazioni raccolte sono completamente anonime. L'archiviazione tecnica o l'accesso che viene utilizzato esclusivamente per scopi statistici anonimi. Senza un mandato, la conformità volontaria da parte del tuo fornitore di servizi Internet o altri registri di terzi, le informazioni memorizzate o recuperate per questo scopo da sole non possono generalmente essere utilizzate per identificarti.
Marketing
Questi cookie tracciano la tua navigazione per fornirti annunci pubblicitari pertinenti.