Allow custom roles to gain access to pay per view

We have a series of custom roles that define different levels of membership. We want fully paid members and executives to have free access to pay per view pages and posts. The settings still (after many requests over at least four years) only provides this function for the built in Editor, Author, Contributor, Subscriber roles.
With 8 customer roles and content that available to multiple levels of membership, and more than one level that sit within each of those four default roles, isn't it about time this plugin supports the functionality provided by other WPMU DEV plugins?

  • Ash

    Hello Len

    Thanks for your suggestion. I can't confirm to membership integration yet but I have added a filter "ppv_authorized_role" in the plugin by which you can add your own role to it. It should be released in next version.

    About direct integration, I am marking this thread as feature request so that other member can contribute their opinion on this

    Have a nice day!

    Cheers,
    Ash

  • Andy

    Hi there, was using PPV to and had this problem but its an easy fix, (which will go away after the update)
    You can hack it in yourself,
    On line 577 you find these lines of codes, add your user roles in there :
    function is_authorised() {

    if ( $this->options['authorized'] == 'true' && is_user_logged_in() && ! current_user_can( 'administrator' ) ) {
    if ( $this->options['level'] == 'subscriber' && current_user_can( 'read' ) ) {

    and on line 2109 it starts with this
    <th scope="row"><?php _e( 'User level where authorization starts', 'ppw' ) ?></th>
    <td colspan="2">
    <select name="level">
    <option
    value="editor" <?php if ( $this->options['level'] == 'editor' ) {
    echo "selected='selected'";
    } ?>><?php _e( 'Editor', 'ppw' ) ?></option>

    You also have to add your user roles here, and that would give you the ability to choose. Its working for me, hope it works for you