Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'mycred_transfer_completed', 'add_bonus_points', 10, 2 );
- function add_bonus_points( $transfer_id, $request ) {
- // Amount charged
- $transfer_amt = $request['charge'];
- // Amount actually transferred
- $transfer_amt = $request['payout'];
- // Senders ID
- $sender = $request['sender_id'];
- // Recipients ID
- $recipient = $request['recipient_id'];
- // Point Type
- $point_type = $request['point_type'];
- mycred_add( 'Transfer Bonus', 3, $transfer_amt, 'Bonus');
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement