Call to undefined function wp_generate_attachment_metadata()
-
Hi,
I am using this plugin for a few years already, I’ve placed the “Phoenix_Media_Rename::do_rename” function inside a template to rename some images by passing by the attachment id. I don’t know exactly when it stopped working, because I didn’t touch this project for a while, but it was running fine in the past, seems to be caused by one of the plugin updates, but I cannot say which one unfortunately.
Now it get this error when calling the template:Fatal error: Uncaught Error: Call to undefined function wp_generate_attachment_metadata() in xxxx/wp-content/plugins/phoenix-media-rename/classes/class-media-rename.php:684 Stack trace: #0 xxxx/wp-content/themes/xxxx/template-rename-media.php(95): Phoenix_Media_Rename::do_rename() #1 xxxx/wp-includes/template-loader.php(106): include('…') #2 xxxx/wp-blog-header.php(19): require_once('…') #3 xxxx/index.php(17): require('…') #4 {main} thrown in xxxx/wp-content/plugins/phoenix-media-rename/classes/class-media-rename.php on line 684
Any idea what has changed? wp_generate_attachment_metadata() seems still to exist, not sure why it’s claiming that it’s undefined.
Thanks a lot!
- You must be logged in to reply to this topic.