All messages from the plugin are sent via gettext API, according to WP standards. That is why you can use the gettext
filter:
/**
* Filters text with its translation.
*
* @param string $translation Translated text.
* @param string $text Text to translate.
* @param string $domain Text domain. Unique identifier for retrieving translated strings.
*/
function my_hcaptcha_message( $translation, $text, $domain ) {
if ( 'hcaptcha-for-forms-and-more' !== $domain || 'Please complete the captcha.' !== $text ) {
return $translation;
}
return 'My text for the completion of hCaptcha';
}
add_filter( 'gettext', 'my_hcaptcha_message', 10, 3 );`
-
This reply was modified 3 years, 2 months ago by
kaggdesign.