Title: Array to string conversion error with v1.4
Last modified: August 30, 2016

---

# Array to string conversion error with v1.4

 *  [Zack Philipps](https://wordpress.org/support/users/zackphilipps/)
 * (@zackphilipps)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/array-to-string-conversion-error-with-v14/)
 * With WP DEBUG turned on I get the following error for transactional emails (actually
   prevents WooCommerce checkout):
 *     ```
       <br />
       <b>Notice</b>:  Array to string conversion in <b>/path/to/wp-content/plugins/mailgun/includes/wp-mail.php</b> on line <b>157</b><br />
       <br />
       <b>Notice</b>:  Array to string conversion in <b>/path/to/wp-content/plugins/mailgun/includes/wp-mail.php</b> on line <b>157</b><br />
       <br />
       <b>Notice</b>:  Array to string conversion in <b>/path/to/wp-content/plugins/mailgun/includes/wp-mail.php</b> on line <b>157</b><br />
       <br />
       <b>Notice</b>:  Array to string conversion in <b>/path/to/wp-content/plugins/mailgun/includes/wp-mail.php</b> on line <b>157</b><br />
       {"result":"success","redirect":"https:\/\/example.com\/checkout\/order-received\/1930?key=wc_order_565f282e78936"}
       ```
   
 * [https://wordpress.org/plugins/mailgun/](https://wordpress.org/plugins/mailgun/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [jepsonrae](https://wordpress.org/support/users/jepsonrae/)
 * (@jepsonrae)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/array-to-string-conversion-error-with-v14/#post-6807643)
 * Mailgun, please sort this out. All you need to do is check for an array before
   setting the value. This is filling up our log files and so making them incredibly
   useless.
 * Thanks
    Phil
 *  [jepsonrae](https://wordpress.org/support/users/jepsonrae/)
 * (@jepsonrae)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/array-to-string-conversion-error-with-v14/#post-6807644)
 * FYI, just raised the bug on Github
    [https://github.com/mailgun/wordpress-plugin/issues/10](https://github.com/mailgun/wordpress-plugin/issues/10)
 *  anonymized-11892634
 * (@anonymized-11892634)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/array-to-string-conversion-error-with-v14/#post-6807666)
 * Is this plugin even supported any more? I can’t get a definitive answer from 
   Mailgun, which is concerning.
 *  [richardgabriel](https://wordpress.org/support/users/richardgabriel/)
 * (@richardgabriel)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/array-to-string-conversion-error-with-v14/#post-6807670)
 * Just chiming in that we, too, are experiencing this issue.
 *  [Dustin Falgout](https://wordpress.org/support/users/lots0logs/)
 * (@lots0logs)
 * [10 years ago](https://wordpress.org/support/topic/array-to-string-conversion-error-with-v14/#post-6807678)
 * Not sure why something so simple has gone unfixed for so long. Here is the changes
   needed to resolve it for anyone who wants to apply them manually:
    ` // campaign-
   id now refers to a list of tags which will be appended to the site tag if ( isset(
   $mailgun['campaign-id'] ) ){ $tags = explode(",", str_replace(" ","", $mailgun['
   campaign-id'])); if (empty($body['o:tag'])) { $body['o:tag']= $tags; } else if(
   is_array($body['o:tag'])) { $body['o:tag'] = array_merge($body['o:tag'], $tags);}
   else { $body['o:tag'].=','.$tags; } }
 * Cheers!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Array to string conversion error with v1.4’ is closed to new replies.

 * ![](https://ps.w.org/mailgun/assets/icon-256x256.png?rev=2434524)
 * [Mailgun for WordPress](https://wordpress.org/plugins/mailgun/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailgun/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailgun/)
 * [Active Topics](https://wordpress.org/support/plugin/mailgun/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailgun/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailgun/reviews/)

 * 5 replies
 * 5 participants
 * Last reply from: [Dustin Falgout](https://wordpress.org/support/users/lots0logs/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/array-to-string-conversion-error-with-v14/#post-6807678)
 * Status: not resolved