As previously announced via banners and our newsletters, support is no longer available through this platform.

For easier navigation, you can still click on "Submit a Ticket" here, choose the appropriate category, and you'll be redirected to the correct support channel for your plugin.

You can still access your previous tickets and browse public tickets, but please note that responding to tickets is no longer possible.

Paid customers: Please log in to your store account for support.

Pre-purchase questions: Use the support widget in the bottom-right corner of our websites:
https://wpamelia.com
https://wpdatatables.com
https://wpreportbuilder.com

Okay
  Public Ticket #2731359
JS Hooks for events
Closed

Comments

  • vishal started the conversation

    Hi,


    I am trying to use JS hooks to change the text of FREE when the event has Zero price.  I am trying to use the below code but nothing seems to happen:

    jQuery(document).ready(function($) {
        window.beforeConfirmedBooking = function () {    
           $('.am-event-free').text(function(i, oldText) {
              return oldText === 'Free' ? 'Donation' : oldText;
          });
        } });

    Is this the correct hook to run after the event list has been loaded?

  • [deleted] replied

    Hi, Vishal!

    I apologize for the delayed response.

    It seems Events don't have that JS hook.

    You can modify this word in the .po file through Loco Translate or Poedit plugin, or use this CSS on the page with Amelia:

    <style>.am-event-free {  visibility: hidden;  position: relative;}.am-event-free:after {    visibility: visible;    top: 0;    left: 0;    content: "Donation";}</style>


    Please let us know if it worked.

    Best Regards.