Skip to content

Commit

Permalink
Merge pull request #93 from ipokkel/update-redirect-logic
Browse files Browse the repository at this point in the history
Redirect from the membership levels page only if user not registered when using BuddyPress for site registration.
  • Loading branch information
andrewlimaza authored Jun 21, 2022
2 parents 137ee5d + c4c6c93 commit dc922d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/restrictions.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ function pmpro_bp_buddypress_or_pmpro_registration() {
if ( $page_setting === 'buddypress' && $on_pmpro_levels ) {
// Use the BuddyPress Register page.
$bp_pages = get_option( 'bp-pages' );
if ( ! empty( $bp_pages['register'] ) ) {
if ( ! empty( $bp_pages['register'] ) && ! is_user_logged_in() ) {
$url = get_permalink( $bp_pages['register'] );
} else {
$url = '';
Expand Down

0 comments on commit dc922d9

Please sign in to comment.