Home › Forums › Ticket Products › Event Tickets Plus › On Free Tickets, how change button text to "Register"
- This topic has 7 replies, 3 voices, and was last updated 8 years, 1 month ago by
wealthfollowsworth.
-
AuthorPosts
-
March 1, 2018 at 10:10 am #1467481
wealthfollowsworth
ParticipantHello. I made a ticket, and left the amount as zero…. so it would show as “Free”.
However, the button next to it still says, “Buy Now”. That is confusing for a free ticket. See screenshot.
Is there a way to change the text of that button to say “Register” when it is a free event?
Thanks.
March 1, 2018 at 11:21 pm #1467942Jennifer
KeymasterHello,
Thanks for reaching out! I definitely understand where you’re coming from. Can you try adding the following to the functions.php file of your child theme?
/**
* Changes Buy Now! button text
*/add_filter( 'tribe_tickets_buy_button', 'changes_button_text', 11, 2 );
function changes_button_text( $html ) {
$html = str_replace("Buy Now!", "Register", $html);
return $html;
}Let me know if this works!
Thanks,
Jennifer
March 2, 2018 at 10:59 am #1468550cdoyle1966
ParticipantI’m actually interested in this as well. Jennifer, in the code snippet you offered wouldn’t that change all of the Buy Now buttons to Register? That might actually be OK for me, but wasn’t sure if you could change it for a single event or not?
March 2, 2018 at 1:02 pm #1468691wealthfollowsworth
ParticipantYes, like cdoyle1966 said, that changes the button text for ALL events.
How do you change it just for events that are $0 (free)?
Thanks.
March 3, 2018 at 12:33 pm #1469204wealthfollowsworth
ParticipantHello. Just following up on this…..
Thanks.
March 13, 2018 at 8:50 am #1477636Jennifer
KeymasterSo sorry for the delayed response here – making this change only when events are free would be a bit more involved, as you would need to get the cost of the ticket, check if it is $0, and then apply this change if it meets that condition. I would recommend taking a look at our functions list if this is something you would like to add.
Alternatively, an easier solution might be to change the text to something that would work for both ticket types, such as “Get tickets”.
We are limited in the amount of support that we can provide for customizations, but if you get stuck or have any questions, please let me know! I’ll be happy to point you in the right direction.
Thanks,
Jennifer
April 4, 2018 at 9:35 am #1496475Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘On Free Tickets, how change button text to "Register"’ is closed to new replies.
