Record Unit Start Time

Using this tip we can record unit time for a student in a custom post meta field.
We’re going to use the action hook : wplms_before_every_unit for this purpose.

Add following code in WPLMS Customizer plugin -> customizer_class.php file:

1. Go to WP Admin -> Plugins -> editor -> wplms customizer -> customizer_class.php
2. Add following line of code in _construct file:

PHP Code:

3. Add this function in class :

PHP Code:

Above code records the timestamp when the user “First” views a unit.

Was this article helpful?

Related Articles