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?