Home › Forums › Ticket Products › Event Tickets Plus › Disactivate Ticket Email
- This topic has 8 replies, 3 voices, and was last updated 9 years, 6 months ago by
Stefano.
-
AuthorPosts
-
November 1, 2016 at 7:23 am #1185741
Stefano
ParticipantI 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
November 1, 2016 at 7:36 am #1185748Geoff
MemberHi 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,
GeoffNovember 1, 2016 at 7:56 am #1185761Stefano
ParticipantHi 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
November 1, 2016 at 2:26 pm #1186022Geoff
MemberHi 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,
GeoffNovember 3, 2016 at 11:34 am #1187201Stefano
ParticipantThanks, Geoff… I’m giving it a shot now.
November 3, 2016 at 11:39 am #1187204Stefano
ParticipantGreat.. worked a charm!
thanks very much
StefanoNovember 3, 2016 at 11:41 am #1187206Stefano
ParticipantOne more question: When I update the Tickets Plus plugin, will it overwrite this modification?
Please instruct me how to avoid this.
thanks again.
November 3, 2016 at 4:39 pm #1187456Geoff
MemberAwesome, 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 -
AuthorPosts
- The topic ‘Disactivate Ticket Email’ is closed to new replies.
