New field “GTIN, UPC, EAN, or ISBN”, not able to import
-
Hi all,
When using the built-in WooCommerce importer/exporter, the new field “GTIN, UPC, EAN, or ISBN” is not included. A snippet has been provided for export that works fine, see below: (Courtesy of @mujuonly and @serafinnyc)
add_filter('woocommerce_product_export_column_names', 'add_custom_gtin_export_column');
function add_custom_gtin_export_column($columns) {
$columns['global_unique_id'] = 'GTIN/UPC/EAN/ISBN';
return $columns;
}
add_filter('woocommerce_product_export_product_row', 'add_custom_gtin_export_row', 10, 3);
function add_custom_gtin_export_row($row, $product, $product_id) {
$gtin_value = get_post_meta($product_id, '_global_unique_id', true);
$row['global_unique_id'] = !empty($gtin_value) ? $gtin_value : '';
return $row;
}I haven’t been able to tweak this to work also for import. Kindly asking for assistance resolving the issue.
Many thanks in advance!
Christian P.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- You must be logged in to reply to this topic.