Support

Home Forums Event Espresso Premium Override Price

Override Price

Posted: February 27, 2013 at 10:31 am

Viewing 3 reply threads


jsmith

February 27, 2013 at 10:31 am

I’m trying to override event_espresso_price_dropdown to change them to radio buttons and found it in two places:
pluginsevent-espressoincludesfunctionspricing.php
pluginsespresso-members.1.9member_functions.php

It looks like the member_functions from the Members plugin is the one being used but if I try to override that in uploadsespresso then it does not override it.

Is it possible to override the one in espresso-members?

Thanks,
Andrew

PS > I’m working off a base of 3.1.21 so it’s possible it’s been changed since then. If so, please just let me know. Don’t expect you to help dig into old versions 🙂


Chris Reynolds

  • Support Staff

February 28, 2013 at 10:00 am

How are you overriding it? Are you declaring the function in your custom_functions.php file?


jsmith

February 28, 2013 at 10:02 am

Yes. If I rename the function in the members plugin it overrides the one from the main plugin but just doesn’t override the one in the members plugin.


Chris Reynolds

  • Support Staff

February 28, 2013 at 10:44 am

It looks like the event_espresso_price_dropdown function in members isn’t wrapped in a function_exists check, meaning your version in custom_functions.php isn’t going to get run without hitting a duplicate function error. What you may be able to do is something like this:

…where you’re checking for the function and if it exists, running your own version instead.

My other suggestion would be to just hack the espresso-members plugin with your code but create a different version of it (named like My Espresso Members Plugin or something) and put it in a different directory so it can be activated separately.

That said, if you’re actually on 1.9 of members, that’s an old version of Event Espresso. As is 3.1.21 (which is about a year old), so it may do to just upgrade first and then mess with this stuff.

Viewing 3 reply threads

The support post ‘Override Price’ 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