Hi! I have a store with over 30 items, and I just added a bunch of custom fields for products. My question now is, is there a way to pro grammatically fill these fields without having to go product by product? My logic… create a CSV file, upload as a table in the database, and run a while loop with this:
while($row = mysqli_fetch_assoc($con,$query){
update_field('field', $row['field'], $row['prod_id');
update_field('field', $row['field'], $row['prod_id');
update_field('field', $row['field'], $row['prod_id');
....
}
Is this possible without having a pre-existing values since these fields were created AFTER the products were placed in the shop?
Without having data already in the fields you should use the field keys and not the field names. Other than that your basic idea as I understand it should work.