Viewing 2 replies - 1 through 2 (of 2 total)
  • Also had the same issue.

    Notice: Undefined index: o:tag in /mailgun/includes/wp-mail.php on line 154

    File to change : /mailgun/includes/wp-mail.php

    The mailgun plugin is assuming o:tag has been declared. My fix is to change line 154

    if ($body['o:tag']=='') {

    to

    if (!isset($body['o:tag'])) {

    One can assume that the else call looks at lines 146-149 which would previously declare tags so I dont think any extra logic would be needed, however if you would like to be extra cautious change the block of code to define o:tag and then use the same mailgun logic

    // 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 (!isset($body['o:tag'])) {
    			$body['o:tag']= '';
    		}
    		if ($body['o:tag']=='') {
    			$body['o:tag']= $tags;
    		} else {
    			$body['o:tag'].=','.$tags;
    		}
    	}

    I had the same issue, just changed line 154 to read
    if (@$body['o:tag']=='' || !isset($body['o:tag']) )

    Something similar is here https://github.com/mailgun/wordpress-plugin/issues/10

    Mailgun seems not to be responding on GitHub

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Notice: Undefined index: o:tag in /var/www/mysite.com/htdocs/wp-content/plugins’ is closed to new replies.