Skip to content

Instantly share code, notes, and snippets.

@lorenzocaum
Created January 25, 2015 01:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lorenzocaum/fcd9ce5ecf2e4375d430 to your computer and use it in GitHub Desktop.
Save lorenzocaum/fcd9ce5ecf2e4375d430 to your computer and use it in GitHub Desktop.
How to adjust the messaging for the ticket action status in the quantity column in the ticket selector for Event Espresso 4

Event Espresso 4 has the following ticket action status messages:

  • Sold Out
  • Goes On Sale
  • Not Available
  • Closed

These are different than the regular ticket statuses as these affect the messaging that is related to purchasing of a specific ticket / pricing option. They are shown in the ticket selector in the quantity column. Here is an example:

http://cl.ly/image/1e0i3i2g0b03

Here are examples of filters on how to change the various messaging:

<?php
//* Do NOT include the opening php tag

//* Change the ticket action status for the sold out message
add_action( 'FHEE__ticket_selector_chart_template__ticket_sold_out_msg', 'ee_custom_messaging_ticket_action_status_sold_out' );
function ee_custom_messaging_ticket_action_status_sold_out() {

 echo 'Replace me with new messaging or remove this entire statement to remove the message.';
}
<?php
//* Do NOT include the opening php tag

//* Change the ticket action status for the goes on sale message
add_action( 'FHEE__ticket_selector_chart_template__ticket_goes_on_sale_msg', 'ee_custom_messaging_ticket_action_status_goes_on_sale' );
function ee_custom_messaging_ticket_action_status_goes_on_sale() {

 echo 'Replace me with new messaging or remove this entire statement to remove the message.';
}
<?php
//* Do NOT include the opening php tag

//* Change the ticket action status for the not available message
add_action( 'FHEE__ticket_selector_chart_template__ticket_not_available_msg', 'ee_custom_messaging_ticket_action_status_not_available' );
function ee_custom_messaging_ticket_action_status_not_available() {

 echo 'Replace me with new messaging or remove this entire statement to remove the message.';
}
<?php
//* Do NOT include the opening php tag

//* //* Change the ticket action status for the closed message
add_action( 'FHEE__ticket_selector_chart_template__ticket_closed_msg', 'ee_custom_messaging_ticket_action_status_closed' );
function ee_custom_messaging_ticket_action_status_closed() {

 echo 'Replace me with new messaging or remove this entire statement to remove the message.';
}

The examples above can be added to your child theme's functions.php file or you can create a site specific plugin: http://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment