Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Temporary fix for recipient not found for author transfers
- function mycred_pro_transfer_id_fix( $recipient_id = false, $to = '' ) {
- if ( $recipient_id === false && is_numeric( $to ) ) {
- $user = get_userdata( $to );
- if ( isset( $user->ID ) )
- $recipient_id = $user->ID;
- }
- return $recipient_id;
- }
- add_filter( 'mycred_transfer_get_recipient', 'mycred_pro_transfer_id_fix', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement