Title: get_user_meta returning empty string
Last modified: August 30, 2016

---

# get_user_meta returning empty string

 *  [jamesdonegan](https://wordpress.org/support/users/jamesdonegan/)
 * (@jamesdonegan)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/get_user_meta-returning-empty-string/)
 * I am writing a filter. Here is the scenario… it’s for a website selling yoga 
   retreats. I have successfully created a new meta profile filed called “retreat_contracts”
   which is meant to store the liability waivers a given user has completed.
 * There’s only one piece that’s not working. For some reason, get_user_meta is 
   not returning a value. I have double and triple-checked the meta field key, and
   it is ‘retreat_contracts’ without a doubt. I can also verify that ‘retreat_contracts’
   is NOT empty in my profile or database (it’s currently mostly curse words), so
   $current_contracts should have that value, right?
 *     ```
       $current_contracts =  get_user_meta( $user_id, 'retreat_contracts', TRUE);
       if (empty($current_contracts)) {
       	// DO THIS STUFF
       } else {
       	// DO THIS STUFF
       }
       ```
   
 * It should be operating the “else” stuff, but it’s not.
 * Any insight?

The topic ‘get_user_meta returning empty string’ is closed to new replies.

## Tags

 * [empty](https://wordpress.org/support/topic-tag/empty/)
 * [get_user_meta](https://wordpress.org/support/topic-tag/get_user_meta/)
 * [string](https://wordpress.org/support/topic-tag/string/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [jamesdonegan](https://wordpress.org/support/users/jamesdonegan/)
 * Last activity: [10 years, 12 months ago](https://wordpress.org/support/topic/get_user_meta-returning-empty-string/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
