Hi,
I use the product feed as XML and would like to tag my articles with the ‘internal_label’.
My feed looks like this:
<g:internal_label>'Accessory','Gaming','Headset'</g:internal_label>
However, the individual values do not arrive correctly, but as a collected string. (see screenshot)
Does anyone have an idea how I should structure my XML?
Thanks and regards, Kristian
I have the same problem. Did this internal_label work before? Is it something that happen recently?
i use this :
$product_tags = wp_get_post_terms( $id, 'product_tag', array( 'fields' => 'names' ) ); if ( ! empty( $product_tags ) && ! is_wp_error( $product_tags ) ) { $product_data['custom_label_1'] = implode( ', ', $product_tags );
// Préparer les étiquettes internes au format requis
$internal_labels = array_merge( array( 'tous le stock' ), $product_tags );
$internal_labels = array_map( function( $label ) {
return "'" . trim( $label ) . "'"; // Ajout des guillemets simples
}, $internal_labels );
$product_data['internal_label'] = '[' . implode( ', ', $internal_labels ) . ']';
} else { // Si aucun tag, internal_label contient seulement "tous le stock" au format requis $product_data['internal_label'] = "['tous le stock']"; }
isnt work
I see the same issue.
I figured it out. You have to make multiple tags to make it recognize all the values. And the stuff about single quotes are simply not true:
<item>
<g:internal_label>
<![CDATA[ egnition-sample-data ]]>
</g:internal_label>
<g:internal_label>
<![CDATA[ men ]]>
</g:internal_label>
<g:internal_label>
<![CDATA[ summer ]]>
</g:internal_label>
<g:internal_label>
<![CDATA[ vans ]]>
</g:internal_label>
</item>
According to facebook documentation, that's not true. I will try it now and will write back again.
Add internal labels to help filter items when you create product sets. For example, you could add a "summer" label to all items that are part of a summer promotion and then filter those items into a set. Internal labels are only visible to you.
Enclose each label in single quotes (') and separate multiple labels with commas (,). Don't include white space at the beginning or end of a label. Character limit: 5,000 labels per product and 110 characters per label.
Example: ['summer','trending']
@Jacob You were right. It worked that way even though it wasn't specified like that in the documentation. Thank you!