1. Home
  2. Knowledge Base
  3. WooCommerce Members Only
  4. Advanced
  5. Filtering the redirect URL
  1. Home
  2. Knowledge Base
  3. WooCommerce Members Only
  4. Filtering the redirect URL

Filtering the redirect URL

If you want to change the page that users are redirected to, you can add this small script to your functions.php file or snippets file:

<?php
/**
* Change the URL that users are redirected to
*/
function prefix_redirect_url( $url ) {
return 'http://yournewurl.com/';
}
add_filter( 'wcmo_redirect_url', 'prefix_redirect_url' );

Don’t forget to update the URL…

Was this article helpful?

Related Articles