How to apply coupon automatically on WPMU membership2 checkout

Membership 2 is an awesome plugin to sell your content. That being said, you can charge your members to see your site content. If you want to give discount, you can use Coupon addon. You have to enable from Membership 2 > Addons and then you can create coupons and share with your users. Today I will show you a trick to share coupon embedded with URL. You can share your URl like domain.com/?coupon=XXXX and the XXXX coupon will be automatically applied on checkout.

Continue Reading

You may also like

Assign and withdraw role on an user based on WPMU Membership2

WPMU Membership2 plugin has an addon that you can use to assign extra capabilities to an user when he joins in a membership, and when the user left the membership the capabilities are withdrawn. But, the problem is, even it says “Assign role”, it doesn’t assign role to that users but just assign the capabilities of that role. So, if you need members of certain role, you won’t get those members in the member list. Even, if you have other plugin that makes some operation based on role, won’t work here. Let’s find a solution. The following snippet will allow […]

Continue Reading

You may also like

Assign a membership to a registered member automatically – Membership 2 (WPMU)

WPMU DEV has released the new revamped version for membership plugin, called Membership 2. The layout and interface is awesome of the plugin and I am personally impressed. There is a new type of membership introduced in the plugin – Default Membership. This membership will work for the user who are just registered but didn’t choose any membership to join. But what if you want to assign a regular membership to that user? Here is a simple code snippet that will help you to do this job: This file contains bidirectional Unicode text that may be interpreted or compiled differently […]

Continue Reading

You may also like

How to add an user into a BuddyPress group automatically when he joins in a WPMU membership

This is an useful snippet that will add your newly registered (via WPMU DEV Membership 2) member to corresponding BuddyPress group. This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters <?php add_action( 'ms_model_relationship_create_ms_relationship_before', 'ms_controller_member_assign_memberships_done_cb', 99, 4 ); function ms_controller_member_assign_memberships_done_cb( $membership_id, $user_id, $gateway_id, $move_from_id ) { // Create an array with membership IDs and group IDs like: /*$array = array( 'membership_id' => 'group_id', 'membership_id' => 'group_id', 'membership_id' => 'group_id' );*/ $config […]

Continue Reading

You may also like