Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Created June 2, 2020 11:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewlimaza/f7783e9168e6b1bbfc99aa92431e56a3 to your computer and use it in GitHub Desktop.
Save andrewlimaza/f7783e9168e6b1bbfc99aa92431e56a3 to your computer and use it in GitHub Desktop.
Example of pmpro_login_redirect_url filter
<?php
/**
* Example to redirect all user's to a specific page when logging in via Paid Memberships Pro site.
*/
function my_login_redirect( $redirect_to, $request, $user ) {
return home_url(); // redirect to home page on login.
}
add_filter( 'pmpro_login_redirect_url', 'my_login_redirect', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment