Redirect Failed Subscription Payment


I'm wondering how I can change the redirect link from a failed subscription payment with the Membership Plugin.

It currently redirects to the list of all my subscription plans. However, I will have 21 subscription plans which will be an overwhelming amount to be redirected to.

Can you help me with this?

  • Vaughan
    • Support/SLS MockingJay

    Hi Daniel,

    Hope you're well?

    I've just been trying to find a hook for this, but I must be looking in the wrong place. Let me just ask one of our developers to see if he can come up with a quick solution for you, i'm sure there is a hook/filter that could be used, just not sure of the how to use it in this case.

    Hopefully the developer should respond shortly.


  • Jose
    • Bruno Diaz

    Hi there Daniel,

    I'm not quite sure what are you trying to achieve. How are the amount of subscription plans and the payment redirect related? why would the amount of subscriptions be a problem? Please clarify.

    In the other hand, the payment return is handled in a specific way for each payment gateway. Which gateway are you using?

    Please advise.

  • Daniel
    • The Incredible Code Injector

    Hello Jose,

    The return from PayPal took me to the "Subscriptions" default page which lists all the different subscriptions. In my site's case, I've setup a filtering questionnaire for the subscriber to complete.

    The questionnaire delineates very minute details between the end product the user will be shipped. Seeing a list of 21 subscriptions at once will definitely cause confusion and possibly drive users away from subscribing.

    I need this to be dead simple.

  • Jose
    • Bruno Diaz

    Hi Daniel,

    If I understood correctly, you are looking for something like this:

    function override_cancel_return_url($url){
        $url = '';
        return $url;
    add_filter( 'membership_cancel_url_paypalsolo', 'override_cancel_return_url', 20, 1 );

    Adding that snippet in your functions.php should do the trick. You may want to use a better approach to get the url for the step-one, like get_permalink($page_id). I hardcoded it just for example pourposes.

    Please let me know if this works fine for you.

    btw, if you switch to paypal express, you will need to change the filter to
    add_filter( 'membership_cancel_url_paypalexpress', 'override_cancel_return_url', 20, 1 );


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.