Object of class WP_Error could not be converted to string