facetwp change text by translating

<?php
/** example of changing a text string using wp's gettext filter **/
add_filter( 'gettext', function ( $translated_text, $untranslated_text, $domain ) {
	if ( $translated_text == 'Enter location' && 'fwp' == $domain ) {
		$translated_text = 'Other text';
	}
	return $translated_text;
}, 10, 3 );