Skip to content

Instantly share code, notes, and snippets.

@JudeRosario
Created December 19, 2015 18:35
Show Gist options
  • Save JudeRosario/cc940d7ffa6a68978dfb to your computer and use it in GitHub Desktop.
Save JudeRosario/cc940d7ffa6a68978dfb to your computer and use it in GitHub Desktop.
Update user meta when a payment has been made
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