Sorry, currently WhatsApp me hasn’t support of WPML. It’s a good feature that we’ll include in a future version.
But thanks to WrodPress filters and a bit of code we can make it ready for translation ??
Add this code to your functions.php
to allow WPML translations of CTA and Message:
function whatsappme_save_wpml_strings($value){
// Register strings for translation
do_action( 'wpml_register_single_string', 'WhatsApp me', 'Call to action', $value['message_text'] );
do_action( 'wpml_register_single_string', 'WhatsApp me', 'Message', $value['message_send'] );
return $value;
}
add_filter( 'pre_update_option_whatsappme', 'whatsappme_save_wpml_strings' );
function whatsappme_load_wpml_strings($value){
// Translate strings
$value['message_text'] = apply_filters( 'wpml_translate_single_string', $value['message_text'], 'WhatsApp me', 'Call to action' );
$value['message_send'] = apply_filters( 'wpml_translate_single_string', $value['message_send'], 'WhatsApp me', 'Message' );
return $value;
}
add_filter( 'option_whatsappme', 'whatsappme_load_wpml_strings' );
Note: I haven’t checked the code, please confirm if works ??