Skip to content

Instantly share code, notes, and snippets.

@nickyoung87
Created July 28, 2020 03:15
Show Gist options
  • Save nickyoung87/8fd729b8b020755a332170119cc385c4 to your computer and use it in GitHub Desktop.
Save nickyoung87/8fd729b8b020755a332170119cc385c4 to your computer and use it in GitHub Desktop.
<?php
/**
* Params
* Required: $post_id
* Optional: $user_id
*/
$has_access = sfwd_lms_has_access( $post_id, $user_id = null );
// Example usage inside a loop
$has_access = sfwd_lms_has_access( get_the_ID() );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment