do_action( 'learndash_register_form' )
Fires inside the registration form.
Description #
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php /** * Example usage for learndash_register_form action. */ add_action( 'learndash_register_form', function() { $course_id = learndash_get_course_id( get_the_ID() ); if ( ! empty( $course_id ) ) { ?><input name="learndash-registration-form-course" value="<?php echo $course_id; ?>" type="hidden" /> <?php wp_nonce_field( 'learndash-registration-form-course-' . $course_id . '-nonce', 'learndash-registration-form-course-nonce' ); } } );
Changelog #
Version | Description |
---|---|
3.0.0 | Introduced. |