Hi @piersert
Sorry for the late answer. We just created our own test environment with WPML, WooCommerce Multilingual and the Storefront theme. We tried the following code:
add_filter('F4/WCSF/get_salutation_options', function($options, $settings) {
if(ICL_LANGUAGE_CODE === 'fr') {
$options['mr'] = 'MR FR';
$options['mrs'] = 'MRS FR';
}
return $options;
}, 10, 2);
On our installation it works perfectly. The reason why only German and English are translated, is that our plugin is already completely translated in this two languages. That means, that none of your if
conditions from your code above matches so the hook doesnt do anything, so the default translations will be show (english or german).
Since our condition are the same as yours, there are only two possibilities:
1. the hook does not work in the email (is the hook defined inside a specific file? or specific condition that does not work in emails? can you tell me more about the definition of this hook?)
2. somehow the ICL_LANGUAGE_CODE constant does not contain the correct language
I dont think testing on your staging environment will help us, because I think is more like a code error or a wrong WPML configuration.