subscription status change hook

This topic contains 3 replies, has 3 voices, and was last updated by  Alex Rollin 5 years, 12 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #2360

    sumit singh
    Free User
    Post count: 12

    Hi,

    I am using wp invoicing plugin.I need one help from your side.can you please tell which hook triggered when subscription status is changed.

    I did some debugging i found this hook “wpinv_subscription_cancelled” but it’s not working.I am using the hook in this way .

    function wc_subscription_cancelled()
    {
    echo ‘hello’;
    exit;
    }
    add_action(‘wpinv_subscription_cancelled’,’wc_subscription_cancelled’, 10, 3);

    If you can reply soon that will be helpfull.

    Thanks

    #2361

    Patrik
    Moderator
    Post count: 1971

    Hi Sumit,

    There are different hooks fired on different events of subscriptions. You can find following hooks which may help you:

    wpinv_subscription_post_create : After subscription crated
    wpinv_recurring_update_subscription : On subscription update
    wpinv_recurring_set_subscription_status : On subscription renew
    wpinv_subscription_completed : On subscription completed
    wpinv_subscription_expired : On subscription expire
    wpinv_subscription_failing : On subscription fail
    wpinv_subscription_cancelled : On subscription cancelled
    wpinv_recurring_record_payment : On subscription payment recorded

    You can use these hooks based on your requirements. Let me know if any queries.

    Regards,
    Patrik

    #2362

    sumit singh
    Free User
    Post count: 12

    Hi patrik,

    Thanks for your response.I have already find the hook.

    Thanks for your help.
    Sumit

    #2367

    Alex Rollin
    Moderator
    Post count: 27815

    Great, thanks for letting us know.

    Feel free to open a new topic if you have more questions.

Viewing 4 posts - 1 through 4 (of 4 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket