cubepoints for paid membership

A quick search of forum posts didn't find an answer so please point me in the right direction if this has been answered previously.
Using Membership with Buddypress and Cubepoints, is there any way to have additional points added when a user purchases an upgraded subscription?

  • DavidM

    Hi Grafics,

    Membership doesn't provide any specific options to that effect. However, it could be done with a bit of coding.

    You could take a look at the WP Roles Integration add-on in Membership to see how that could be done:

    The M_Roles_joinedlevel() function, which is on line 84 in the curent version, uses a Membership action hook to add a user role to a member upon Access Level movement.

    You could use that same action hook to add CubePoints functionality. The following would let you add points to a user's CubePoints, based on their id ($uid).
    cp_points ( 'membership', $uid, $total, '' );

    Come to think of it, this would probably be best done through a CubePoints module, rather than a Membership Add-on. If I get a moment, I'll see about providing a module for that.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.