apply_filters( 'learndash_course_open_set_user_access_from', boolean $update_access_from, int $user_id, int $course_id )
Filters whether to update user course access from value.
Contents
Description #
Parameters #
- $update_access_from
-
(boolean) Whether to update user access from.
- $user_id
-
(int) User ID.
- $course_id
-
(int) Course ID.
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php
/**
* Example usage for learndash_course_open_set_user_access_from filter.
*/
add_filter(
'learndash_course_open_set_user_access_from',
function( $update_access_from, $user_id, $course_id ) {
// May add any custom logic using $update_access_from, $user_id, $course_id.
// Always return $update_access_from.
return $update_access_from;
},
10,
3
);