-
-
Save Pebblo/01368b45b94e43dbb10c69b3b245361c to your computer and use it in GitHub Desktop.
Example of how to change the Ticket Selector QTY field based on a custom field set on the event
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //Please do not include the opening PHP tag if you already have one. | |
//Another example that uses a custom field within the event. | |
//Set ee_purchase_tickets to true within your event to display 'Purchase Tickets' | |
//If no value has been set default to the standard button text (Register Now). | |
function tw_ee_custom_filter_ticket_selector_qty_text( $qty_text, $event_id ) { | |
$ee_custom_qty_text = get_post_meta( $event_id, 'ee_custom_qty_text', true ); | |
if ( $ee_custom_qty_text ) { | |
return $ee_custom_qty_text; | |
} | |
return $qty_text; | |
} | |
add_filter( 'FHEE__ticket_selector_chart_template__table_header_qty', 'tw_ee_custom_filter_ticket_selector_qty_text', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment