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.