Guest User

Untitled

a guest
Aug 1st, 2015
385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 KB | None | 0 0
  1. add_action('processed_subscription_payment', 'custom_process_order', 10, 1);
  2.  
  3. function custom_process_order($user_id) {
  4.    
  5.     $amount = 9;
  6.     $funds = get_user_meta( $user_id, 'account_funds', true );
  7.     $funds = $funds ? $funds : 0;
  8.     $funds += floatval( $amount );
  9.     update_user_meta( $user_id, 'account_funds', $funds );
  10.    
  11. }
Advertisement
Add Comment
Please, Sign In to add comment