Disactivate Ticket Email

Home Forums Ticket Products Event Tickets Plus Disactivate Ticket Email

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1185741
    Stefano
    Participant

    I really need to disactivate the ticket that gets sent via email after purchase. I do online events so no ticket to print is necessary. I give out a link for videoconference connection by inserting it into the ticket in “product” view as a purchase note. Customers get their receipt after purchase with this info easily visible so NO TICKET EMAIL IS NECESSARY. Please help me, I’m not a programmer!

    thanks

    #1185748
    Geoff
    Member

    Hi Stefano and welcome to the forums!

    This snippet should stop the ticket email from being sent:

    https://gist.github.com/geoffgraham/be22dc7c8d621081980b

    Please add it to your theme’s functions.php file and test a ticket sale to confirm it does the trick. 🙂

    Cheers,
    Geoff

    #1185761
    Stefano
    Participant

    Hi Geoff,

    I’m not too familiar with altering files, so tell me if this is correct procedure:

    Appearance > Editor > Avada Theme (not child theme) > function.php

    Add the snippet at the end of the page. This is what the last lines of the code look like:

    ….

    function avada_auto_update( $key, $raw_key ) {

    if ( ‘avada’ === $key && ‘Avada’ === $raw_key ) {
    return $raw_key;
    }
    return $key;

    }
    // Check if doing an ajax theme update, if so make sure Avada theme name is not changed to lowercase.
    if ( defined( ‘DOING_AJAX’ ) && DOING_AJAX && isset( $_POST[‘action’] ) && ‘update-theme’ === $_POST[‘action’] ) {
    add_filter( ‘sanitize_key’, ‘avada_auto_update’, 10, 2 );
    }

    /* Omit closing PHP tag to avoid “Headers already sent” issues. */

    put snippet here?

    thanks for your help Geoff!

    Stefano

    #1186022
    Geoff
    Member

    Hi Stefano,

    Good question!

    I generally advise making code changes in the file itself using a text editor rather than using the WordPress code editor. That way, if something goes awry, you still have access to revert the code and access the WordPress dashboard.

    That said, I do believe that is the correct place to add the snippet. To make sure I’m doing my job as best I can, here’s a WordPress Codex post on best practices for editing files in WordPress:

    https://codex.wordpress.org/Editing_Files

    If you do choose to edit the file directly in WordPress, then I would definitely take the advice in that post to make good backups just for good peace of mind so that you can easily revert in the event you need to.

    I’ll also put out there that we have a list of recommended developers should you want some additional support for making custom changes.

    Let me know if you have additional questions!

    Cheers,
    Geoff

    #1187201
    Stefano
    Participant

    Thanks, Geoff… I’m giving it a shot now.

    #1187204
    Stefano
    Participant

    Great.. worked a charm!

    thanks very much
    Stefano

    #1187206
    Stefano
    Participant

    One more question: When I update the Tickets Plus plugin, will it overwrite this modification?

    Please instruct me how to avoid this.

    thanks again.

    #1187456
    Geoff
    Member

    Awesome, so glad to hear that snippet helped do the trick! Thanks so much for following up to let me know. 🙂

    Updating the plugin will not remove the snippet, so you are safe there. However, I will note that installing an update to your theme would indeed remove it, so please beware before installing any automatic updates to your theme.

    I see you marked this thread as resolved so I’ll go ahead and close it, but definitely feel free to let us know if any other questions come up and we’d be happy to help.

    Cheers!
    Geoff

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Disactivate Ticket Email’ is closed to new replies.