Advertisement
designbymerovingi

Untitled

Sep 22nd, 2017
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. add_action( 'mycred_transfer_completed', 'add_bonus_points', 10, 2 );
  2. function add_bonus_points( $transfer_id, $request ) {
  3.  
  4. // Amount charged
  5. $transfer_amt = $request['charge'];
  6.  
  7. // Amount actually transferred
  8. $transfer_amt = $request['payout'];
  9.  
  10. // Senders ID
  11. $sender = $request['sender_id'];
  12.  
  13. // Recipients ID
  14. $recipient = $request['recipient_id'];
  15.  
  16. // Point Type
  17. $point_type = $request['point_type'];
  18.  
  19. mycred_add( 'Transfer Bonus', 3, $transfer_amt, 'Bonus');
  20.  
  21. return;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement