Support

Home Forums Multiple Event Registration Add-on Extend cart.php file

Extend cart.php file

Posted: February 4, 2015 at 5:10 am

Viewing 1 reply thread


GM Admin

February 4, 2015 at 5:10 am

We are trying to extend the wp-content/plugins/event-espresso/includes/functions/cart.php file. Where should we put it?
Btw, we know that in order to extend the template we need to put those files here: wp-content/uploads/espresso/templates/.
We tried to put the cart file here: wp-content/uploads/espresso/includes/functions/cart.php but it did not work.


Sidney Harrell

February 9, 2015 at 10:31 am

The includes files were not designed to be overridden like the template files in uploads/espresso. Many of the core functions have a function_exists wrapper around them, so for those, you would just put your custom version of those functions into a site-specific custom code holding plugin. As long as WP scans your custom function before it sees the standard EE function, it will use the custom version. If there are functions in the cart.php file that do not have a function_exists wrapper around them, then the best thing to do would be to add the function_exists wrapper to it. That way your custom code is safely away from being overwritten by an update, and at the worst, you would have to add the function_exists wrappers back into place after an update.

Viewing 1 reply thread

The support post ‘Extend cart.php file’ 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