Passer la navigation

[Closed] Multiple instance values don't get export

This support ticket is created Il y a 4 years, 6 months. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Ce sujet contient 1 reply, a 2 voix.

Dernière mise à jour par Nigel Il y a 4 years, 6 months.

Auteur
Publications
#2186595
Screen Shot 2021-10-04 at 6.40.18 pm.png
Screen Shot 2021-10-04 at 6.39.47 pm.png

Hi there,
We have a website build using WooCommerce and toolset. We added custom fields for WooCommerce using Toolset. The field type is File and it has "Allow multiple instaces of this field" set YES .

When we export the post's data, the meta data field contains the value of only last item. We are wondering if there is a way we can export the values of all instance of that post.

#2186615

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+01:00)

What tool are you using to export the data?

If you have a custom field that accepts multiple values, it just means that there can be multiple entries in wp_postmeta with the same key for a post. That is not particular to Toolset, it's just normal WordPress.

If you look at the function get_post_meta for example (https://developer.wordpress.org/reference/functions/get_post_meta/), you'll see the final parameter is whether to return a single value, which if false returns an array of all of the values for the field with that key for that post.

So it sounds like a problem with the tool you use to export the data, which isn't handling multiple entries in wp_postmeta, even though that is just a standard feature of WordPress.

The topic ‘[Closed] Multiple instance values don't get export’ is closed to new replies.