It’s actually just a php script, I placed it in the plugins folder originally, but it had this error so I moved the whole folder to the root directory where it could find the file but returned call to undermined function above.
Should I place it in a plugin and upload it that was and call the function when needed ?