Support

Home Forums Custom Files Add-on (EE3) Removing $0 price on Free events

Removing $0 price on Free events

Posted: June 3, 2015 at 3:53 pm

Viewing 3 reply threads


dfehling

June 3, 2015 at 3:53 pm

I would like to remove the column with “Price” and then “$0.00 (USD)/ ticket” on my ticket selector. All events on the site will be free so it is fine to remove that for all. I can’t do it in the CSS though since there isn’t a class for those items, just for the table column and to use “display:none;” messes up everything.

I found the template file but copying it to my child theme to edit also doesn’t work since it doesn’t override the one in the plugin. Please advise. Thanks!


Josh

  • Support Staff

June 4, 2015 at 11:37 am

Hi there,

There’s a filter hook that you can use to specify your custom templates location. Here’s an example that shows how to set it to look in the activated WP child theme:

add_filter ('FHEE__EE_Ticket_Selector__display_ticket_selector__template_path', 'my_custom_ticket_selector_template_location');

function my_custom_ticket_selector_template_location(){
    return get_stylesheet_directory() . '/ticket_selector_chart.template.php';
}


dfehling

June 4, 2015 at 6:54 pm

Perfect!! Thanks so much. As a followup question – how do I set a similar filter hook for the attendee_info_main.template.php page? How do I know what ‘FHEE_ …”
path to use to override a page?


Josh

  • Support Staff

June 4, 2015 at 7:06 pm

It turns out not all of the templates are overridable in a similar way as the ticket selector. As a general rule of thumb, you look in the plugin code for something like apply_filters( 'FHEE__{...}', '{default you want to override}' );

You’ll a filter hook like the above on line 2 of the attendee_info_main.template.php that you can use to override part of the page.

If you need to customize anything further you’re welcome to suggest new filter and actions hooks. If you do, please feel free to open a pull request over on GitHub and we’ll review.

Viewing 3 reply threads

The support post ‘Removing $0 price on Free events’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso