Created
October 9, 2017 14:07
-
-
Save Nishadup/b87b05c5e3a021f1d92926b0ceb42fd2 to your computer and use it in GitHub Desktop.
Snippet to translate Tracking text.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('wf_custom_tracking_message', 'update_tracking_message', 10, 3); | |
function update_tracking_message($current_msg, $language, $order){ | |
$wpml_language = get_post_meta( $order, 'wpml_language', true); | |
if( $wpml_language == 'fr-ca' ){ | |
return "Votre commande a été expédiée le [DATE] via [SERVICE]. Pour suivre les envois, veuillez suivre le lien correspondant aux numéros d'expédition [ID]"; | |
}else{ | |
return "Your order was shipped on [DATE] via [SERVICE]. To track shipment, please follow the link(s) [ID]"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment