Support » Developing with WordPress » update_post_meta not working or returning anything.

Viewing 1 replies (of 1 total)
  • Hi,

    print_r() turns boolean values into strings, TRUE is returned as “1” and FALSE as empty string “”. It’s possible that update_post_meta() returns FALSE in your case (which, according to documentation would happen If the meta_value passed to this function is the same as the value that is already in the database). Obviously you wouldn’t see empty string on your page, try using var_dump( $value ) instead of print_r($value).

Viewing 1 replies (of 1 total)
  • The topic ‘update_post_meta not working or returning anything.’ is closed to new replies.