• Resolved antinopol

    (@antinopol)


    When changing the first and last names of the user, these data are not updated in the database (certificate_student_name_5025), from where the first and last names are calculated for display in the certificate. It turns out that the old Name and Last or even -Student Name- come to the certificate.

    Please correct, or have the First and Last Name read directly from WordPress.

    • This topic was modified 3 years, 4 months ago by antinopol.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter antinopol

    (@antinopol)

    Found why the meta data in the database is not updated.
    In the code, this data is intentionally not overwritten, but how can you figure out why?

    Add a filter here so I can override the $save_data_keys array.

        static function store_certificate_data($certificate_id, $user_id, &$data)
        {
            $save_data_keys = array(
                'student_name',
                'author',
            );
    
            foreach ($data as &$field_data) {
                if (!in_array($field_data['type'], $save_data_keys)) continue;
    
                $field = get_user_meta($user_id, "certificate_{$field_data['type']}_{$certificate_id}", true);
    
                if (!empty($field)) {
                    $field_data['content'] = html_entity_decode($field);
                } else {
                    update_user_meta($user_id, "certificate_{$field_data['type']}_{$certificate_id}", $field_data['content']);
                }
    
                /*For testing purposes*/
                //delete_user_meta($user_id, "certificate_{$field_data['type']}");
            }
    
        }
    • This reply was modified 3 years, 4 months ago by antinopol.
    • This reply was modified 3 years, 4 months ago by antinopol.
    Thread Starter antinopol

    (@antinopol)

    And it would be great to customize the date format for the dates that are used in the certificate.

    Please add a setup or a filter.

    else if ($field['type'] === 'end_date' && !empty($course_id)) {
    	$end_date = get_user_meta($current_user_id, 'last_progress_time', true);
    	if (!empty($end_date[$course_id])) {
    		$field['content'] = date('d.m.Y', $end_date[$course_id]);
    	}
    Plugin Support EricStylemixThemes

    (@ericstylemixthemes)

    Hello @antinopol

    Thank you for reaching out!

    Certificate builder comes with the Masterstudy Pro plugin and is not available in the free version. According to the rules of this forum, we do not publish information about Pro features on https://www.ads-software.com:

    https://www.ads-software.com/support/guidelines/#do-not-post-about-commercial-products

    We have a dedicated platform to support our customers. Leave your question using the link below and our agents will answer you with great pleasure. Furthermore, it helps us to discuss the problem in detail.

    https://support.stylemixthemes.com/tickets/new/support?item_id=26

    Thank you for understanding and helping us with this.

    Kind regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Bug while forming the user Name in the certificate.’ is closed to new replies.