strangerstudios / paid-memberships-pro

WordPress membership plugin to restrict access to content and charge recurring subscriptions using Stripe, PayPal, and more. Fully open source. 100% GPL.
https://www.paidmembershipspro.com
Other
465 stars 358 forks source link

Support edit_profile_url filter for Edit Profile link on account page #1148

Open ipokkel opened 5 years ago

ipokkel commented 5 years ago

Is your feature request related to a problem? Please describe. The link to "Edit Profile" on the account page is hard coded in the account page and cannot be changed using the edit_profile_url filter hook.

Describe the solution you'd like Being able to change the URL address for this link via a callback using the edit_profile_url filter.

Describe alternatives you've considered Using custom code to redirect users to a custom profile page.

add_action( 'admin_init', 'my_profile_redirect' );`
function my_profile_redirect() {
    global $current_user;
    if( defined( 'IS_PROFILE_PAGE' ) && !current_user_can( 'manage_options' ) ) {
        wp_safe_redirect( '/new-profile-url' );
        exit;
    }
}

Additional context https://developer.wordpress.org/reference/hooks/edit_profile_url/

dparker1005 commented 3 years ago

We may also now want to use that filter ourselves to send users to our frontend profile.