Call to undefined function __update_post_meta() (3 posts)

  1. ktsixit
    Posted 4 years ago #

    Hi all,
    I have placed the following code in a template file

    __update_post_meta( $the_post_id, 'user_id', $user_id );

    but each time the code executes there's an error occuring:

    Fatal error: Call to undefined function __update_post_meta() in /home/public_html/wp-content/themes/mytheme/register.php on line 133

    I suppose that I have to import some kind of wordpress file here, but I don't know what that should be. Any suggestions?

  2. Michael
    Forum Moderator
    Posted 4 years ago #

    try to use the function name without the two underline characters;



  3. ktsixit
    Posted 4 years ago #

    That's the way I've been using this function since now, and it's been working fine.... But I was silly enough not thing to test the function after removing the underline. Thanks a lot!

Topic Closed

This topic has been closed to new replies.

About this Topic