sensei-certificates
sensei-certificates copied to clipboard
Certificate data field enhancements
In one of the integrations I'm working with we needed the ability to add some additional data fields to the generated certificates. We're using these fields to display some additional (custom) course metadata such as the instructor name, course number, number of credit hours, etc.
I was able to accomplish this by adding an extra meta box to the certificate template edit page and hooking into sensei_process_certificate_template_meta
and sensei_certificates_before_pdf_output
, but this approach was cumbersome and required a lot of duplication of code from the main Certificates plugin into my own plugin.
I'd suggest the following changes to help improve the Certificates plugin for this type of scenario:
- Replace the hard-coded (and mostly duplicated) field output/update code in writepanel-certificate_data.php with dynamically-generated fields based off a filtered array of field data (similar to how
get_customer_meta_fields()
and thewoocommerce_customer_meta_fields
filter work in WooCommerce). - Modify
generate_pdf()
in class-woothemes-sensei-certificate-templates.php to use these dynamically-specified fields and add a filter for the field content (instead of just usingstr_replace
on each field) to allow more template {{tags}} to be added.
I'm not sure if this is the type of thing you'd like to support with this plugin, but I'd be happy to make these changes and submit them as a pull request if you're interested.
Thanks @misenhower - this isn't something we'll be implementing as a priority, but we will consider any pull requests if they make sense for the majority of users.
Perhaps you could describe your use case in more detail, so we can judge the demand for this change?
Here's a screenshot showing the functionality I added for my client:
These fields appear on the Certificate Template page and can be positioned on the certificate like the other, built-in certificate data fields. They also support extra {{tags}} that are replaced with custom course metadata.
This system works, but it required a lot of duplicated code and I don't think it's going to be easily maintainable in the long run. The changes I have in mind for the Sensei Certificates plugin wouldn't affect the default functionality of the plugin, it would just add some filters to enable something like this in a much cleaner fashion.
I'll put together a pull request when I have a chance a little later. Thanks!
Sounds good. Feel free to submit a PR, and we'll review it when we get chance.
Hello, did this enhancement got added or not?
Hello, did this enhancement got added or not?
No. This functionality is still desperately needed for this plugin.
This is still a much needed addition. I am really surprised that something this basic hasn't been included. All i need to do is add a points system onto a certificate. There should just be a basic hook system that i can put an acf field into.
This is still a much needed addition. I am really surprised that something this basic hasn't been included. All i need to do is add a points system onto a certificate. There should just be a basic hook system that i can put an acf field into.
I very much agree. The lack of more full-featured certificate functionality is specifically why I steer my corporate clients towards other LMS platforms that have the features they need.
This is still a much needed addition. I am really surprised that something this basic hasn't been included. All i need to do is add a points system onto a certificate. There should just be a basic hook system that i can put an acf field into.
I very much agree. The lack of more full-featured certificate functionality is specifically why I steer my corporate clients towards other LMS platforms that have the features they need.
What would you reccomend?
I need this functionality desperately! I just need to add one field from my customer data and that's all. This should be made a priority issue
I need this functionality desperately! I just need to add one field from my customer data and that's all. This should be made a priority issue
This has been a request since 2016, it's safe to say that it's not coming. If you desperately require this functionality, you'll want to code it in yourself or look into a different LMS.
@mis
Here's a screenshot showing the functionality I added for my client:
These fields appear on the Certificate Template page and can be positioned on the certificate like the other, built-in certificate data fields. They also support extra {{tags}} that are replaced with custom course metadata.
This system works, but it required a lot of duplicated code and I don't think it's going to be easily maintainable in the long run. The changes I have in mind for the Sensei Certificates plugin wouldn't affect the default functionality of the plugin, it would just add some filters to enable something like this in a much cleaner fashion.
I'll put together a pull request when I have a chance a little later. Thanks!
@misenhower How do you manage to do this ? Have you modified the plugin ? or created your separate addon OR in the functions.php file ? Can you suggest me hook ? I don't want to modify plugin , rather I want to implement in a separate addon or functions.php file
https://wordpress.org/support/topic/print-serial-number-on-certificate/
Serial number on certificates requested in https://wordpress.org/support/topic/certificado-sensei-numero-de-serie/
5812629-zen
Ability to add custom fields/data to Certificates for students of a professional course; eg, registration number, etc.
6025705-zen
User requesting the ability to show a certificate hash for authenticity.
Possibly the most important needed thing for the Certificate generation is adding custom fields (like hash), please bump this issue up
Possibly the most important needed thing for the Certificate generation is adding custom fields (like hash), please bump this issue up
Considering that there are now at least 20 security-related pull requests that have been ignored, I would assume this plugin is no longer being developed and additional feature requests will be ignored.
Possibly the most important needed thing for the Certificate generation is adding custom fields (like hash), please bump this issue up
Considering that there are now at least 20 security-related pull requests that have been ignored, I would assume this plugin is no longer being developed and additional feature requests will be ignored.
Ironically as I got your email update I am just starting to develop a new medical course using sensei, and I have the exact same problem that I had when i did this back in 2020. but i can see that there has been a load of new development on sensei since I last looked at it. they are developing it, just also ignoring our update requests. Last time we hardcoded the course points into the Sensei LMS Certificates plugin and then changed its version number to 9999 so it could never update.
@square-socket Thank you for replying here. How did you hardcode the course points in the certificate? Can you share that code?
https://builtbyexternal.wordpress.com/2023/07/03/sensei-course-and-lesson-page/#comment-538
+1 from
- 7320973-zen
- 7558104-zen