Import fail condition
-
Hi,
Great plugin! I found a bug that will cause an import to fail given a file exported from another website with certain conditions, but I’ve also got the solution.If you are transferring shipping settings from site A to site B, and site A has created several shipping zones and then deleted those zones, then the
zone_idof the first zone in the database will not be 1, however when the importer tries to create the shipping zones in the database, it will start with an empty database, and then try and create a record with zone_id != 1, which causes this error:`
WordPress database error: [Column count doesn’t match value count at row 1]
INSERT INTO <db_prefix>_woocommerce_shipping_zones VALUES(‘4′,’Australia’,’1′,”,’0′)
`but the row seems to be inserted anyway with zone_id = 1.
However the importer will continue to import the methods the original zone_id.Possible Solutions:
– update the zone_id after import using SQL.
– edit the JSON file so that all zone_ids are contiguous and re-map non-contiguous zone_ids in the shipping_zones and shipping_zone_methods to contiguous IDs.Thanks.
The topic ‘Import fail condition’ is closed to new replies.