Hello,
in certificate, student name is the public “pseudo”, we need to show Student REAL NAME. How can I perform this ?
For info : I looked to plugin files, and I see 2 ways but need from you to update plugin.
WAY 1 :
Add filter on returned value.
Example : wp-content/plugins/learnpress-certificates/inc/layers/class-lp-student-name-layer.php
Replace
$this->options['text'] = ! empty( $user ) ? " " . $user->get_display_name() : $this->options['text'];
By
$student_name = ! empty( $user ) ? " " . $user->get_display_name() : $this->options['text'];
$this->options['text'] = apply_filters( 'learnpress-certificates/layer/student-name', $student_name);
WAY 2 :
Enclose all classes in “wp-content/plugins/learnpress-certificates/inc/layers” by :
if ( ! class_exists('YourClassName') ) { Your Class }
These ways will allow dev to load a replacement class and do his own stuff like change the student name.
Please let me know how can I do and what way do you chose to update plugin ;)
Thanks for your help.
Best regards.
Joffrey