• Resolved Mike Gillihan

    (@mikegillihan)


    Hey there! Nice work on the plugin.

    I’m getting a few notices/warnings around the IS_PROFILE_PAGE constant while on the front-end.

    “Use of undefined constant IS_PROFILE_PAGE – assumed ‘IS_PROFILE_PAGE’ in /example.com/wp-content/plugins/wp-user-profiles/wp-user-profiles/includes/sections.php on line 77”

    I think this may be due to wp_user_profiles_register_other_section being hooked onto ‘init’ but I don’t believe IS_PROFILE_PAGE is defined yet at that point. I may be wrong.

    I’m also getting some headers already sent (by the same function) warnings when trying to register new users via Restrict Content Pro registration form.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Mike Gillihan

    (@mikegillihan)

    OK, so digging in further I found that this is only happening when current user is not logged in. You’re defining the constant in common.php but only for logged in users.

    Adding

    if ( ! is_user_logged_in() ) {
    		return;
    	}

    at the top of wp_user_profiles_register_other_section() solved the problems I was having.

    Thread Starter Mike Gillihan

    (@mikegillihan)

    Thanks for the fix!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘IS_PROFILE_PAGE constant causing conflicts’ is closed to new replies.