I want to update WooCommerce products by the WP All import. I have 2 independent xml files (from the first one I’m getting prices, from the second one descriptions). For some reasons product’s _sku
is {code}
from the first one xml not {ean}
. So I put {ean}
into product attribute pa_ean
to match the products from the first one and the second one xml.
Now I don’t know how to write the php function to return product_id
so WP All import could update right products with right descriptions.
Question posted in Woocommerce
The official Woocommerce documentation can be found here.
The official Woocommerce documentation can be found here.
2
Answers
I put
{ean}
to Custom field, not to Attribute and after that I can easily use it in WP All import.Do you have any unique identifier that are same for the product in both files? Like product_key or something. If you have it you can store it as custom meta for that product and get product by that meta key, something like below ↓