• I am building a language lesson site. The lessons themselves are served up on pages. I would like to restrict access on pages to those who have enrolled in a class.

    So I need to be able to programmatically enable access when they have successfully paid for a class. I looked at the tutorials and found information about manually in/excluding access, but was unable to find anything on programmatic access.

    Can you describe how one might programmatically enable access to page that is restricted?

    Thanks!

    https://wordpress.org/plugins/advanced-access-manager/

Viewing 1 replies (of 1 total)
  • Hi mirgcire,
    It is a good question. Currently we do not have filter that will allow you to do that easily but we can add it on our next release.
    By now we can agree with how to name it.

    So. I believe the best place to add filter is application/control/object/post.php file and function has. This function returns the boolean value true if restriction is applied for post or page.
    We can wrap the $response with apply_filters(‘aam_post_has’, …

    You can use this filter in your code to dynamically change the return value.
    Let me know what do you think about this solution.

    Regards,
    Vasyl

Viewing 1 replies (of 1 total)
  • The topic ‘Page Access Restriction’ is closed to new replies.