Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function check_ld_access( $can_access, $user_id, $post_id ) {
- if ( ! function_exists( 'sfwd_lms_has_access' ) ) {
- return $can_access;
- }
- if ( 'sfwd-courses' == get_post_type( $post_id ) && false == sfwd_lms_has_access( $post_id, $user_id ) ) {
- $can_access = false;
- }
- return $can_access;
- }
- add_filter( 'wpf_user_can_access', 'check_ld_access', 10, 3 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement