Advertisement
verygoodplugins

Untitled

Dec 18th, 2018
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.29 KB | None | 0 0
  1. function fix_lookup_field( $user_meta, $user_id ) {
  2.  
  3.     foreach( $user_meta as $key => $value ) {
  4.  
  5.         if( is_object( $value ) && isset( $value->name ) ) {
  6.             $user_meta[$key] = $value->name;
  7.         }
  8.  
  9.     }
  10.  
  11.     return $user_meta;
  12.  
  13. }
  14.  
  15. add_filter( 'wpf_pulled_user_meta', 'fix_lookup_field', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement