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?
Gerenciar o consentimento de cookies
Usamos cookies para otimizar nosso site e nossos serviços. Seu consentimento nos permite processar dados como o comportamento de navegação. O não consentimento pode afetar alguns recursos.
Funcional
Sempre ativo
Necessário para que nosso site funcione e se comunique corretamente.
Preferências
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Estatísticas
Nós os usamos para analisar as estatísticas do nosso site. As informações coletadas são totalmente anônimas. O armazenamento ou acesso técnico que é utilizado exclusivamente para fins estatísticos anônimos. Sem uma intimação, o cumprimento voluntário por parte do seu Provedor de Serviços de Internet, ou outros registros de terceiros, as informações armazenadas ou recuperadas para este propósito geralmente não podem ser usadas para identificá-lo.
Marketing
Esses cookies rastreiam sua navegação para fornecer anúncios relevantes para você.