-
-
Save ionatan-israel/f3a9205e80014e6efcb4c2fd13ca45dd to your computer and use it in GitHub Desktop.
Update user meta when a payment has been made
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('ms_gateway_transaction_log', 'update_meta_on_stripe_return' , 999, 8); | |
function update_meta_on_stripe_return( $id, $h, $is_paid, $sub, $iid, $amt, $n, $eid ) { | |
mail('[email protected]', 'TEST', "Was Paid : ".$is_paid); | |
if( $is_paid ) | |
update_user_meta( $sub->user_id, 'some_meta', 'some_value' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment