Title: Name change function
Last modified: May 14, 2020

---

# Name change function

 *  Resolved [tiicaa](https://wordpress.org/support/users/tiicaa/)
 * (@tiicaa)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/name-change-function/)
 * I would like to remove the concatenation of the first name and the last name 
   of the students’ certificates. I would like to show only the first name, make
   an edit in the archives
    class-woothemes-sensei-certificate.php and in class-
   woothemes-sensei-certificate-tempates, change the name’s visibility to:
 *     ```
       // Get Student Data
       			$user_id      = get_post_meta( $certificate_id, 'learner_id', true );
       			$student      = get_userdata( $user_id );
       			$student_name = $student->display_name;
       			$fname        = $student->first_name;
       			$lname        = $student->last_name;
   
       			if ( '' != $fname && '' != $lname ) {
       				$student_name = $fname;
       			}
       ```
   
 * However, if there is an update to the plugin, if you lose these settings, could
   you help me include a function in the functions.php of my children’s theme? How
   can I insert a function in the file that changes this?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Dan (a11n)](https://wordpress.org/support/users/drawmyface/)
 * (@drawmyface)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/name-change-function/#post-12865347)
 * Hi there
 * You can only edit a function via your child theme if the function includes action/
   filter hooks that enable the data passed to the function to be changed. In this
   function there are no hooks that would allow that, so I’m afraid it’s not possible
   to customize this function via your child theme’s functions.php file.
 * Sorry I can’t be more help here.
 *  Thread Starter [tiicaa](https://wordpress.org/support/users/tiicaa/)
 * (@tiicaa)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/name-change-function/#post-12876816)
 * [@drawmyface](https://wordpress.org/support/users/drawmyface/)
    And it would 
   not be possible to create a child from that file – class-woothemes-sensei-certificate.
   php
 *  [Dan (a11n)](https://wordpress.org/support/users/drawmyface/)
 * (@drawmyface)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/name-change-function/#post-12900212)
 * I’m afraid not, as I mentioned elsewhere, you can only do that with template 
   files.
 *  Plugin Author [Donna Peplinskie (a11n)](https://wordpress.org/support/users/donnapep/)
 * (@donnapep)
 * [6 years ago](https://wordpress.org/support/topic/name-change-function/#post-12974332)
 * Closing.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Name change function’ is closed to new replies.

 * ![](https://ps.w.org/sensei-certificates/assets/icon-256x256.png?rev=2531144)
 * [Sensei LMS Certificates](https://wordpress.org/plugins/sensei-certificates/)
 * [Support Threads](https://wordpress.org/support/plugin/sensei-certificates/)
 * [Active Topics](https://wordpress.org/support/plugin/sensei-certificates/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sensei-certificates/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sensei-certificates/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Donna Peplinskie (a11n)](https://wordpress.org/support/users/donnapep/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/name-change-function/#post-12974332)
 * Status: resolved