Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114 Custom Files: Cannot redeclare event_espresso_price_dropdown | Event Espresso - Staging Server
I copied event_espresso_price_dropdown() to custom_functions.php and I get this error: Fatal error: Cannot redeclare event_espresso_price_dropdown() in …/plugins/espresso-members/member_functions.php on line 345
I didn’t make any changes in that function. The custom_functions.php is in folder: wp-content/uploads/espresso
My Event Espresso version is 3.1.31.1 and WP is 3.5.1. The installation is new and only on my local computer.
Just remove the two slashes at the start of the line, and place a corresponding ending curly bracket on line 463, after the end of that function. That should prevent the fatal error. If you are modifying that function in the custom files with the members add-on running, then that copy from the members add-on may be the one that you want to copy into the custom files and modify.
Fatal error: Cannot redeclare event_espresso_price_dropdown() (previously declared in …wp-content/uploads/espresso/custom_functions.php:159) in …/wp-content/plugins/espresso-members/member_functions.php on line 345
On member_functions.php on line 343 it says:
“if (!function_exists(‘event_espresso_member_price_dropdown‘))” and the next function is named “event_espresso_price_dropdown”. So should I name my function in custom_functions.php “event_espresso_price_dropdown” or “event_espresso_member_price_dropdown“. Which one is correct?
Either can be correct, but they should be consistent. Since you’re trying to override event_espresso_price_dropdown, the conditional check on line 342 should be:
if (!function_exists('event_espresso_price_dropdown')) {
I checked and at one time there was an event_espresso_member_price_dropdown function, but it’s not in the plugin anymore. I’ll make a ticket so the conditional wrapper gets updated in a future version.
Viewing 3 reply threads
The support post ‘Custom Files: Cannot redeclare event_espresso_price_dropdown’ 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.