Skip to:
Content
Pages
Categories
Search
Top
Bottom

Create Payed Acces


  • h365
    Participant

    @h365

    Hello,

    is it possible to create payed access to single profiles?

    Example: there is public person, he creates a profile on my page. Than there is a FAN form this person, he wants to access the profile of this public person and want to see his pictures and texts.

    The fan can now buy access to this persons profile my monthly payment. This money goes to the public person and a small % goes to the website owner.

Viewing 1 replies (of 1 total)

  • Venutius
    Moderator

    @venutius

    It’s certainly possible to restrict access to the users profile, in your function you could use:

    
    function bpex_template_redirect() {
        $authorised = //your function to check they'd paid
        if ( bp_is_user_profile() && get_current_user_id() !== bp_displayed_user_id() ) {
            if ( ! $authorised ) {
                // redirect away from profile page
            }
        }
    }
    
    add_action( 'template_redirect', 'bpex_template_redirect' );
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar