• Resolved tiicaa

    (@tiicaa)


    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)
  • 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

    (@tiicaa)

    @drawmyface
    And it would not be possible to create a child from that file – class-woothemes-sensei-certificate.php

    I’m afraid not, as I mentioned elsewhere, you can only do that with template files.

    Plugin Author Donna Peplinskie (a11n)

    (@donnapep)

    Closing.

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

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