Support

Account

Home Forums General Issues ACF fields in the database

Solving

ACF fields in the database

  • On the site, I use the plug-ins Advanced Custom Fields Pro and ACF for WooCommerce. There are two groups of user fields that were created with the same settings, but for some reason in the database, the data of these groups are stored differently.

    The data of the first group of fields is saved correctly, for example:
    meta_key: “user_phone”
    meta_value: “+79998887766”

    And accordingly, in e-mails to the administrator, this data is correctly displayed.

    But the second group keeps the data different:
    meta_key: “field_5b7e4f388fd11”
    meta_value: “+79998887766”

    And in the letters to the admin, these data are not displayed at all.

    Tell me, what is it related to and how can I fix it?

  • Something has caused the field name to be altered to match the field key. The field key is the “slug” of the post and the field name is stored in the “excerpt”. This is usually caused by a filter that is altering the ACF field posts. Do you have any filters on your site that are altering the excerpt when a post is saved?

  • Thanks for the answer. How can you find out?

  • It seems that there are no such filters. I put a clean version of WordPress on a test site. Installed plugins – Woocommerce, ACF and ACF for WooCommerce. Created custom fields and placed them in the my-account of the user WooCommerce.

    In the database, the fields are still stored as field_5ba168bfdcb58 (user_phone) and field_5ba16910dcb59 (user_age). Therefore, I no longer know what to do.

  • There is a plugin “Loushou: ACF for WooCommerce”, which is not updated for two years. Here, the database correctly stores the fields as ‘user_phone’ and ‘user_age’.

    Can problems with the plugin “ACF for WooCommerce”? The database also has the string “acf_user_settings a: 1: {s: 15:” show_field_keys “; s: 1:” 1 “;}”

  • I don’t really know what your problem is. This is how I would test. I would create a new field group and save it to see if the field name is getting changed. If it is I would start deactivating plugins and keep testing until the problem goes away. My first suspects would be plugins that are out of date or that are supposed to work with ACF. If deactivated all the plugins I would switch themes and see if something there was causing it. I would probably set up a duplicated of the site on a dev/testing server and to the debugging there.

  • I already wrote earlier. I put a clean version of WordPress on a test site. I installed the Storefront theme. Installed plugins – Woocommerce, ACF and ACF for WooCommerce. Created custom fields and placed them in the my-account of the user WooCommerce.

    I do not have third-party plugins on the test server, which do not work well.

    The only question is the plugin “ACF for WooCommerce”, which saves to the database “field_5ba168bfdcb58”. Why can not this plugin save “user_phone”?

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘ACF fields in the database’ is closed to new replies.