Support » Plugin: Give - Donation Plugin and Fundraising Platform » How to change first name to given name

  • Resolved halimvn

    (@halimvn)


    i would like to change firstname and lastname in personal info section, to given name and family name. but cant find the function to change it. can you help me?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Maruti Mohanty

    (@marutim)

    Hi There,

    You can change the first and last name in the personal section by adding the following custom snippet to your website.

    function mpm_give_text_switcher( $translation, $text, $domain ) {
    	if ( 'give' === $domain ) {
    		if ( 'First Name' === $text ) {
    			$translation = 'Given Name';
    		}
    
    		if ( 'Last Name' === $text ) {
    			$translation = 'Family Name';
    		}
    	}
    
    	return $translation;
    }
    add_filter( 'gettext', 'mpm_give_text_switcher', 10, 3 );
    

    If you need any help in adding a custom snippet to your website, you can check this detailed doc here for more help: https://givewp.com/documentation/resources/adding-custom-functions-to-your-wordpress-website/

    Thank you 🙂

    halimvn

    (@halimvn)

    thanks you so much

    Plugin Support Maruti Mohanty

    (@marutim)

    Glad it helped 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to change first name to given name’ is closed to new replies.