"Object of class WP_Term could not be converted to string" -

"Object of class WP_Term could not be converted to string"

Normally when I've seen this it's when you are using a variable like a normal string when in fact it's actually an array such as this example:


[Tue Mar 13 04:22:35 2018] [error] PHP Catchable fatal error:  Object of class WP_Term could not be converted to string in /vhost/httpdocs/wp-content/plugins/wp-instagram-post/classes/class-woo-igp.php on line 578

                                $tags = get_tags($post_id);
                                foreach ( $tags as $tag )
                                   $the_tags=$the_tags. "#". $tag;


With the above the $tag variable actually is an array so you would need to reference it like this $tag->name or $tag["name"];


  • sudo: unable to resolve host
  • "Object of class WP_Term could not be converted to string"
  • Wordpress Instagram Post Modify Plugin To Add Tags
  • Linux input/output error invalid program cannot read data on some CD-Rs and DVD-Rs on ASUS BW-16D1HT
  • Installing SSL Certificate with Chain Intermediary CA File
  • PHP Warning: Cannot load module 'XCache' because conflicting module 'apc' is already loaded in Unknown on line 0
  • Unable to load dynamic library '/usr/lib64/php/modules/module.so' - /usr/lib64/php/modules/module.so: cannot open shared object file: No such file or directory in Unknown on line 0
  • How to start screen in bash script or from /etc/rc.local on startup as a specific user
  • Linux How To Clone One System Harddrive to another remote system
  • Ubuntu/Debian/Linux won't boot and drops to Busybox shell after cloning HDD with dd
  • Unable to negotiate with port 22: no matching host key type found. Their offer: ssh-dss Solution
  • Centos 7 Password Reset
  • MySQL Adding New Field to Existing Database Table
  • MySQL Cannot Update/Write to any database table solution
  • Centos How To Update to Glibc 2.14 Plus
  • php remove last letters of string
  • MySQL Maximum INT Size Truncation Issue/Warning
  • MySQL How To Add New Field Column To Existing Table
  • mysql how to reset passwords with a few commands
  • htaccess apache how deny/allow to block or allow by IP address