Description
If you are looking to insert custom user data stored in a user’s WP Profile into LearnDash Certificates (such as Company Name, Student/Staff ID, Membership Number, etc.) then this plugin will help you to accomplish that task!
You can grab any custom field from the User Profile and turn it into a shortcode which can be used in a certificate or WP post/page. Using this plugin alongside the free Woocommerce addon ‘Flexible Checkout Fields for WooCommerce‘, you could for example include custom fields for your users to complete during checkout which can then printed onto their LearnDash certificate once they have completed their course!
Once installed just follow the instructions below, a video detailing these steps can be viewed here
Use ‘Flexible Checkout Fields for WooCommerce’ to extend your checkout form with any additional custom fields for the user to complete. The free version provides a basic text field, but if you want to capture other forms of data (ie. using a Date Picker) then there is also a premium version available.
Navigate to a User Profile page and find the custom data that you wish to use in a shortcode, we need to discover the LABEL FOR id that has been assigned to this value.
The quickest way to find this out (in Chrome/Firefox) is to right click on the Bold text label on the left hand side of the profile screen and choose ‘Inspect’ or ‘Inspect Element’, you should now see the HTML code that generates this label, make a note of the value written in the <label for=”COPY THIS VALUE”> tag.
Produce your shortcode using the value you have just discovered like so:
[user_meta key=PASTE VALUE HERE]
Here is an example of what your shortcode may look like using Flexible Checkout Fields:
[user_meta key=billing_association_id_345] (FCF always seems to generate a random number towards the end of the LABEL FOR value but thankfully this is the same for every user.)
Place your shortcode where ever you wish. If you want to use your shortcode in a certificate just paste it into your HTML code the same way that you would with standard LearnDash certificate shortcodes.
Reviews
There are no reviews yet.