Customize "Purchase" button text for each event or item

Home Forums Ticket Products Event Tickets Plus Customize "Purchase" button text for each event or item

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #104511
    osamu
    Participant

    Depending on which items I sell, I would like to tweak the Purchase button. Sometime I would like to say “Save my spot”, “Download” or “Buy now”, etc…

    #104959
    Brook
    Participant

    Howdy osamu,

    That’s a good question. This is quite possible as a modification. I would say it is a rather easy one if you know PHP and are familiar with the WP API. Here’s how it can be done.

    Using this snippet as a template, you would want to filter the translation text for the $domain == ‘tribe-eddtickets’ and the $text == ‘Add to cart’. From there you could run your logic. If you wanted to show a unique bit of text depending on what category the event is in, then you could use get_the_terms() to detect the category and run from there. If you want it to be truly unique to each event, then you could add a custom field. By default the value of Additional Fields and its label will be showed on the public View Event page. You would probably want to hide that, so using our Meta Walker API you would want to hide that particular field from showing. To get the value of your custom field, you could use the following:

    $label_value = TribeEventsCustomMeta::get_custom_field_by_label("Case Sensitive Label Name")

    Does that all make sense? Are you able to get it working? Please let me know, or fire away if you have more questions. Cheers!

    – Brook

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Customize "Purchase" button text for each event or item’ is closed to new replies.