Support » Plugins and Hacks » Call to undefined function __update_post_meta()
4 years, 6 months ago
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?
try to use the function name without the two underline characters;
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!