Okay I find solution for this one!!
Add field to the each product variation with this one
github Remi Corson
And because I have a custom gateway plugin for WooCommerce I found there where products are initiated and use foreach to get ‘productId’ for each product. There I use
$variation = $item[‘variation_id’];
$productVariation = get_post_custom($variation);
$variation = $productVariation[‘my_added_field‘][0];
// We need that [0] because it returns array of one key and value
And that is it! Hope that it will help somebody
Related Posts:
- How to access custom order item meta data from a meta key in WooCommerce?
- Save Custom Fields for Variations Product
- Adding existing user custom field value to a woocommerce product [closed]
- Adding Custom Text Area to WooCommerce Product
- WooCommerce conditional required checkout fields [closed]
- Include woocommerce custom field value in front-end search result
- woocommerce product custom field
- How to get customfield value by woocommerce product ID
- Conditionally hide or show woocommerce product variation in fontend by custom field
- Woocommerce: Custom fields and email shortcodes, ec_custom_field
- Bulk remove post meta
- How to create html block to display extra information on woocommerce single product page
- Display WP-Types custom fields in post [closed]
- how to put a custom field value in variable
- Modifying custom order item meta from admin order view
- How to create a dropdown select of all items in an ACF field group
- How do I add an image upload, custom field to a WooCommerce product?
- WooCommerce – Adding Custom Fields To Invoice
- Woocommerce Product Custom Select List (not variation)
- jQuery – Automatic event trigger does not **really** check my form
- Declaring in variables [closed]
- How to add new field to the account address?
- Populate Javascript code with value from WordPress Custom Field?
- How to display custom field in woocommerce email orders? [closed]
- IF Custom field value equals ZERO
- Function that replaces the image in the absence of the post meta
- Woocommerce Retrieving custom field value from orders
- Changing the order of custom fields in the dashboard for Woocommerce variable products [closed]
- Update custom field values on edit address page woocommerce
- Woocommerce frontend edit custom fields
- Is it possible to add Term Meta Fields to a WooCommerce Attribute?
- Why does my numeric meta query work only on one meta key and not the other?
- Update custom field on the fly
- (woocommerce) How to get product id form order id & then retrieve custom meta linked to product?
- How to delete WooCommerce Products than have a specific custom field?
- How to save array option as text and not integer?
- Use a different catalog image than the featured image
- Check if value exists before saving
- Using ACF Custom Field value in a URL with do_shortcode() [closed]
- Add Custom field under the post title [closed]
- woocommerce how in checkout to add my custom field check box, and when i check it hide the shipping adress and add tax 19% [closed]
- price calculation from custom field (woocommerce) [closed]
- Hiding custom fields when content is empty [closed]
- Cannot save values to custom fields for variations on Woocommerce 2.4.6
- Send checkout page custom field in order email
- Extract array from custom field
- Assign class to Drop Down Selections in WooCommerce Products Custom Fields
- Is there a way to set default custom fields when creating a post?
- Show only posts which can be commented OR have custom meta field
- How do I make a custom field choose an image?
- get_post_meta() unserialize issue – returns boolean(false)
- How can I remove fields in the attachment editor?
- Edit Custom Database Tables in WordPress
- Change content before writing to database
- post meta data clearing on autosave
- WordPress Search Custom Meta Field Only
- Query Problem – Show posts within category ‘x’ that have a custom field between ‘y’ and ‘z’
- Add description text under input field for new profile fields
- Which is best in the following scenario : post_meta vs custom table vs parent/child posts
- How to add content at the end of posts?
- wordpress custom fields multiple data
- Woocommerce custom meta fields, sort by date
- Why the pagination for a query modified by pre_get_posts doesn’t mind the number & order of posts sorted & selected based on a custom date time field
- Trouble checking if custom woocommerce checkout field is empty or not
- Trying to update_post_meta function
- How do i add custom fields to my themes template file?
- Custom Field to a Role?
- Ordering posts by custom field named “date” in backend
- How to pass page as an argument like post in WordPress?
- How to display custom fields from a plugin
- Adding “meta” info to WP site PHP function?
- WordPress Media Uploader custom Javascript not working
- Custom fields issue [closed]
- Select custom posts by meta_value and sort by a different meta value
- List custom queried terms in the edit-tags.php?taxonomy page
- Front end register with custom fields
- Display custom field from the front page on another page
- Display custom widget value in header.php
- Gravity Forms Update post meta from template [closed]
- Automatic linking terms
- wpdb function insert doesn’t work
- Conditionally run function based on custom meta value?
- Get Custom Field Name ( Label or Key ) Not Value
- Adding Custom Metadata to my Archive/Posts page
- Ordering by ACF custom field vaule
- add different custom fields value to post class if permalink or index
- How to fix a conflict cause by my theme with Woocommerce and/or Gravity Forms?
- Create Shortcode shows only posts with custom_field meta
- Extend WP_User_Query or WP_User to return all custom fields?
- Quicktag button to automatically add a custom field to a post
- WordPress taxonomy child image
- Create custom fields/meta data gender+country – radiobuttons and dropdown on register screen for these fields
- Add nofollow to custom field link and make domain exceptions?
- Download stuff after filling fields?
- Custom registration form and custom field
- Need help saving input fields for Security Deposit plugin in WC Vendors page
- How can i put a custom field inside this php
- Grabbing value of input field inside of array
- Save And Display Mp3 Audio files on WooCommerce product page with Dokan
- Conditional display based on ACF checkbox