wordpresswoocommercewpallimport

WooCommerce, WP all import - Find product ID by attribute value


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.


Solution

  • I put {ean} to Custom field, not to Attribute and after that I can easily use it in WP All import.