Support

Home Forums Event Espresso Premium Incorrect data is shown in WP-admin after pre-filling custom fields.

Incorrect data is shown in WP-admin after pre-filling custom fields.

Posted: January 11, 2019 at 4:39 pm

Viewing 5 reply threads


wvdzeijden

January 11, 2019 at 4:39 pm

Hi Josh,

I installed your script you posted here:
https://github.com/eventespresso/ee-code-snippet-library/blob/master/addons/eea-wp-user/mn_wp_user_addon_save_custom_answers_too.php

It works fine on the frontend and data is saved correct in the database, but… Check out this picture.

When I check the data of custom fields in the WP admin the data is incorrect (see image on the left). It seems some cached data. It always shows the same with different subscriptions.

Could you help me to fix this?

Wouter


Josh

  • Support Staff

January 14, 2019 at 3:43 pm

Hi,

May I ask where exactly are you looking in the database? The custom script (which I didn’t write, for what its worth) is intended to take the registrant’s previously answered questions and apply them to the same questions in later registrations. The part of your screenshot on the left (the registration admin page) gets the data from the _esp_answer table.

If you think the problem might be related to caching, can you check to see if your site is using a caching plugin?


wvdzeijden

January 20, 2019 at 3:02 pm

I indeed checked the _esp_answer table. So it’s saved correct in there. What do you mean with a “caching plugin”. Could you give an example of something like that?


Tony

  • Support Staff

January 22, 2019 at 4:51 am

What do you mean with a “caching plugin”. Could you give an example of something like that?

Caching plugins (amongst other things) save the response from the server and then use that same response for other requests.

Some examples can be found here: https://www.wpbeginner.com/plugins/best-wordpress-caching-plugins/


wvdzeijden

January 25, 2019 at 7:39 am

Hi Guys, just wanted to update you the problem was that the script mentioned above was also executed in the WP admin, instead of only on the frontend. I guess that was causing the problem. All is working well now. 🙂


Tony

  • Support Staff

January 25, 2019 at 7:56 am

Hi there,

Thanks for the update but I’m a little confused, do you mean this script?

https://github.com/eventespresso/ee-code-snippet-library/blob/master/addons/eea-wp-user/mn_wp_user_addon_save_custom_answers_too.php

So the above registration in the image was from a manual admin registration?

Viewing 5 reply threads

The support post ‘Incorrect data is shown in WP-admin after pre-filling custom fields.’ 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