Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Matt Cromwell

    (@webdevmattcrom)

    Generally, for changing text throughout the plugin, we recommend a translation tool like Loco-Translate or using Poedit to provide your site with local translations of the plugin.

    But if you just need to change one or two strings, this filter will do that for you:

    function my_give_text_switcher( $translations, $text, $domain ) {
    
    	if ( $domain == 'give' && $text == 'First Name' ) {
    		$translations = __( 'Name', 'give' );
    	}
    	return $translations;
    }
    add_filter( 'gettext', 'my_give_text_switcher', 10, 3 );

    If you need guidance implementing custom PHP functions on your website, we have this guide here: https://givewp.com/documentation/resources/adding-custom-functions-to-your-wordpress-website/

    Thanks!

    Thread Starter riatech

    (@riatech)

    Thank you very much for the codes and the translation plugin suggestion. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change ‘First Name’ Label to ‘Name’’ is closed to new replies.