• Resolved yourbudweiser

    (@yourbudweiser)


    In my Certificate Settings, I have entered 20002 for the Next Sequential ID but when it is printed on the Ceritifcate using the {sequential_id} merge tag, it shows as 020002.

    Is it possible to remove that leading 0?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Nick Mariano

    (@reddotinmotion)

    Hi @yourbudweiser,

    You can try using the llms_certificate_sequential_id_format filter from wp-content\plugins\lifterlms\includes\models\model.llms.user.certificate.php. I have not tested this but, after inspecting the source code of that file, it appears that you can try returning the array below to remove the zero left padding.

    array( 
    'length' => 6,
    'character' => ' ',
    'type' => STR_PAD_LEFT
    )

    Another filter you can use is llms_certificate_sequential_id. That filter is also located on the same file. We recommend that you review that file at wp-content\plugins\lifterlms\includes\models\model.llms.user.certificate.php so you can decide on the best solution for you.

    Thread Starter yourbudweiser

    (@yourbudweiser)

    For future reference, place in functions.php:

    /**
    * Remove Awarded Certificate leading 0
    */
    function my_llms_certificate_sequential_id_format( $format ) {
    $format = array(
    'length' => 0,
    'character' => ' ',
    'type' => STR_PAD_LEFT,
    );
    return $format;
    }
    add_filter( 'llms_certificate_sequential_id_format', 'my_llms_certificate_sequential_id_format' );
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Certificate Sequential ID’ is closed to new replies.