Home › Forums › Legacy Support › Support queries › Other issues › Buddpress Group Membership Expiration
- This topic has 9 replies, 4 voices, and was last updated 4 years ago by Anshuman Sahu.
Viewing 10 posts - 1 through 10 (of 10 total)
-
AuthorPosts
-
March 30, 2020 at 8:48 pm #248054mdeglaSpectatorHello How can we Make Students membership to the Course Group Expire (Or Get Removed from the Group) after 6 Months Without Loosing Access To The Course content ? and how can i sell Group membership to them again ? the Conclusion is that i want to use the course group as a support group which the students get access to them with buying the course for only 6 months then they will have to pay again to get access again to the group - but they get unlimited access to the course content How to achieve that ? thanksMarch 31, 2020 at 2:20 pm #248171JacksonBlockedHello, please use a membership plugin which is pmpro already available in your plugins sections. then install this: https://wordpress.org/plugins/pmpro-buddypress/ this will allow you to achieve your desires.April 1, 2020 at 12:56 pm #248370mdeglaSpectatorHello I Tried Every Membership Plugin You Can Think of None of Them Provide The Ability For The user To lose Access To a buddypress group after a Specific duration Even The Plugin You Provided a link of It doesn't Remove the User from a group or restrict Viewing it or posting to it and most important it has no Multiple Memberships Option So i can't Provide support groups To Multiple courses i am contacting you because you already deal with groups memberships with course enrollment so as we joining members to groups add a functionality to lose access after specific time ThanksApril 2, 2020 at 10:44 am #248546VeronicaModeratorhi, we can do a thing we can write code for this: when a student or user's subscription is expired for the course then we can restrict the user to access the group and forum for that course.April 2, 2020 at 10:46 am #248547mdeglaSpectatorhi, But i want To give unlimited access to the course and the group membership is the only thing that expire can we achieve that ? ThanksApril 3, 2020 at 7:53 am #248695VeronicaModeratorno this can't be achieve because we need some that i have told you like after expiry the subscription of user we can achieve this. but you said there is ultimate access then in this case we can't do this.April 3, 2020 at 9:47 am #248720mdeglaSpectatorok so no problem Please Give Me The Code for "when a student or user's subscription is expired for the course then we can restrict the user to access the group and forum for that course." ThanksApril 4, 2020 at 12:20 pm #248974Anshuman SahuKeymasterplease try adding this custom css in your wp-admin -> appearance -> customize -> custom css : add_action('bp_before_group_header',function(){ $group_id = bp_get_group_id(); global $wpdb;$user_id = get_current_user_id(); $results = $wpdb->get_results($wpdb->prepare("SELECT post_id from {$wpdb->postmeta} WHERE meta_value = %s AND meta_key= %s ",$group_id,'vibe_group')); foreach ($results as $key => $value) { $expiry = get_user_meta( $user_id,$value->post_id,true); if(empty($expiry) || (!empty($expiry) && $expiry < time())){ echo '<meta http-equiv="refresh" content="0;URL=\''.get_permalink($value->post_id).'\'" />'; } } });April 17, 2020 at 12:38 pm #252168mdeglaSpectatorhi thanks for the code will it work for course batches as well ?? thanksApril 18, 2020 at 10:20 am #252414Anshuman SahuKeymasternope batches are connected differently with courses . It will work your connect batch with as course group as well . But there can only be one group in course while there can be multiple batches for course .
-
AuthorPosts
Viewing 10 posts - 1 through 10 (of 10 total)
- The topic ‘Buddpress Group Membership Expiration’ is closed to new replies.