Title: Custom fields for Variable products (EAN code import)
Last modified: March 23, 2020

---

# Custom fields for Variable products (EAN code import)

 *  Resolved [Lukas Prelovsky](https://wordpress.org/support/users/lukas-prelovsky/)
 * (@lukas-prelovsky)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/custom-fields-for-variable-products-ean-code-import/)
 * Good day,
 * I try to get EAN codes to products.
 * Products are Variable
 * For EAN CODE i use plugin Product GTIN (EAN, UPC, ISBN) for WooCommerce (author
   Emanuela Castorina)
 * and this plugin have custom fields:
 * `_wpm_gtin_code` / simple product
 * Unfortunately, variants have a shelf
 *     ```
       _wpm_gtin_code_variable0
       _wpm_gtin_code_variable1
       _wpm_gtin_code_variable2
       _wpm_gtin_code_variable3
       _wpm_gtin_code_variable4
       ```
   
 * ………..
 * value:
    `{Extended_Xml_Attributes[1]/variants[1]/variant[1]/ean[1]}`
 * ean in my xml:
    `{ean[1]}`
 * and I don’t know how to add custom fields to automatically add them if the product
   has multiple variants.
 * Can’t advise how to proceed if I want to add ean to variable products and also
   use the above plugin?
 * Thank you for your response
    -  This topic was modified 6 years, 2 months ago by [Lukas Prelovsky](https://wordpress.org/support/users/lukas-prelovsky/).
      Reason: code adding

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * (@wpallimport)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/custom-fields-for-variable-products-ean-code-import/#post-12574213)
 * Hi [@lukas-prelovsky](https://wordpress.org/support/users/lukas-prelovsky/)
 * > Can’t advise how to proceed if I want to add ean to variable products and also
   > use the above plugin?
 * I would have to see your import settings/data to properly advise on this. Please
   set up your GTIN plugin on a debug site at [http://wpallimport.com/debug](http://wpallimport.com/debug),
   replicate your import, and then send us the debug site URL in a new ticket at
   [http://www.wpallimport.com/support/](http://www.wpallimport.com/support/). Please
   include a link to a manually created variable product on the debug site that 
   shows the desired results.
 *  Thread Starter [Lukas Prelovsky](https://wordpress.org/support/users/lukas-prelovsky/)
 * (@lukas-prelovsky)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/custom-fields-for-variable-products-ean-code-import/#post-12577351)
 * Hi,
 * I sent you both a sandbox and pictures for a better understanding of the problem.
 * In short, my problem is that the plugin
 *     ```
       https://wordpress.org/plugins/product-gtin-ean-upc-isbn-for-woocommerce/
       ```
   
 * have custom fields
    `_wpm_gtin_code field`
 * but it doesn’t add it to the variable products of the variations.
 * I believe the solution will be simple
 * Thank you for your response 🙂
 *  Plugin Author [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * (@wpallimport)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/custom-fields-for-variable-products-ean-code-import/#post-12607540)
 * Hi [@lukas-prelovsky](https://wordpress.org/support/users/lukas-prelovsky/)
 * I see that you’ve opened a ticket via our website regarding this issue. Let’s
   continue working on it there since it will require tests with your data.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Custom fields for Variable products (EAN code import)’ is closed to new
replies.

 * ![](https://ps.w.org/wp-all-import/assets/icon-256x256.png?rev=2570179)
 * [WP All Import – Drag & Drop Import for CSV, XML, Excel & Google Sheets](https://wordpress.org/plugins/wp-all-import/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-all-import/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-all-import/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-all-import/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-all-import/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-all-import/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/custom-fields-for-variable-products-ean-code-import/#post-12607540)
 * Status: resolved