Hook when donations are added with renewal status #7142
Replies: 4 comments 1 reply
-
hey thanks a lot for the prompt reply Yes I am doing some custom code whenever a donation is added but I want to perform same custom code for each renewal donation as well and it seems give_update_payment_status is not firing |
Beta Was this translation helpful? Give feedback.
-
The Donation Model has two hooks to consider:
Each hook is passed a single argument, which is the Donation Model. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot @kjohnson So this 'givewp_donation_updated' only fires when renewal is done? does this not fire for normal donation? because I didn't fire.
|
Beta Was this translation helpful? Give feedback.
-
But I was looking further I think this should work
|
Beta Was this translation helpful? Give feedback.
-
Hey
is there are any hook like
function your_function( $donation_id, $new_status, $old_status ) {
your code here
}
add_action( 'give_update_payment_status', 'your_function', 200, 3 );
which we can use
when renewal happens on stripe and it pushes donation in givewp with status "renewal"
Beta Was this translation helpful? Give feedback.
All reactions