Filter: "wootickets_email_message" not changing the message

Home Forums Ticket Products Event Tickets Plus Filter: "wootickets_email_message" not changing the message

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1007967
    Sean
    Participant

    I was helped by Brian a few weeks ago, and he provided me the correct filter to use. However, since then we’ve received 2 new orders and both customers promptly emailed us back asking where their followup ticket email was (Due to the default WooTickets email that state that the tickets will be sent in another email.)

    The message we’d like is in the code snippet below, which is un-working.

    The code was placed in functions.php of our child theme. Please review the code and let us know if there’s anything we did that would prevent it from working, or if not then what else could be the culprit. As an additional measure, where can we override the call to this hook in the plugin file if this does not work? [We had overriden this message in plugin files a few versions ago and have kept changing it after theme updates; however a recent theme release made that hack unworkable, likely due to a change in the plugin framework.]

    Thank you for your help. Below is the code we are attempting to use:

    add_filter( 'wootickets_email_message', 'sdn_wootickets_filter_completed_order', 10 );
    function sdn_wootickets_filter_completed_order ( $text ) {
    
    	$text = "Thank you for your purchase. Course times and dates are listed on the course information page from where you placed your order. Find your course on the course listing page. You may also find detailed course info on this page. We look forward to seeing you!";
     
    	return $text;
    
    } // sdn_wootickets_filter_completed_order ( $text )
    #1008328
    George
    Participant

    Hey Sean!

    Sorry you’re having some trouble with this snippet – however, the snippet itself is fine and there’s no problem with putting it in a child theme functions.php file…

    You could try adding the snippet to the functions.php file of your parent theme, perhaps, and also there might be a difference if you remove the “priority” argument in your add_filter call – i.e. instead of this:

    add_filter( 'wootickets_email_message', 'sdn_wootickets_filter_completed_order', 10 );

    You just have this:

    add_filter( 'wootickets_email_message', 'sdn_wootickets_filter_completed_order' );

    Just some ideas.

    If you do a test purchase for yourself, does the email that you receive have the proper message?

    — George

    #1008519
    Sean
    Participant

    Removing the , 10 did it for me, and I was able to keep it in the child theme. Though it’s only verified in test purchase – should hold true in production mode.

    Thanks for your help!

    #1008757
    George
    Participant

    Thanks for the update Sean! Glad to have helped 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Filter: "wootickets_email_message" not changing the message’ is closed to new replies.