• I’m using WooCommerce 2.5.5.

    We have 183 variations across 17 products. Most of them are just fine, but about 20 of my SKUs are being rejected. All the SKUs are 12 digit numbers (our UPC barcode numbers).

    When I try to create a variant with about 20 of our SKUs (748252302748, for instance) I get an error saying “Variation SKU must be unique.”

    I verified that the post_meta table contains NO instances of 748252302748. Then, just for good measure, I performed a database-wide search of every field in every table, and the string “748252302748” appears NOWHERE in the databaase.

    I found a report of another person having a similar problem, and they optimized their database and that fixed it. So I tried that, but to no avail.

    I also assigned a test SKU to the variant, and that worked, but when I tried to change it to 748252302748 the error came back. I checked the post_meta table again, and then checked the entire database again, and the value “748252302748” still did not exist anywhere.

    There are about twenty different SKU numbers having this problem. All are unique, and none of them appear in the database.

    We have another WordPress/WooCommerce site running on the same versions, where all 183 UPC are working fine.

    Any ideas?

Viewing 6 replies - 1 through 6 (of 6 total)
  • oldcode

    (@coconutcoder)

    Ever get a solution to this?

    Thread Starter mgatten

    (@mgatten)

    No. We have been forced to abandon the whole variants feature. Which is really unfortunate. I would very much like to find a fix. (I take it you’re experiencing the same?)

    oldcode

    (@coconutcoder)

    Yeah, getting that error. I just added a trailing underscore to the sku numbers to make them different, and they took. I don’t think this is satisfactory, however, because I’m just the web programmer, and I don’t know how I’m going to ask the inventory department to change sku numbers to make the buggy web plugin work.

    oldcode

    (@coconutcoder)

    This fixed it for me. In the database, I performed this query:

    SELECT * FROM wp_postmeta WHERE meta_key LIKE ‘_sku’

    At 30 records per page, and 6 pages, on page 6 I found duplicates of the sku #s that were giving errors. In phpMyAdmin I deleted those records, and suddenly I was able to use the correct sku #s on variable products with no errors.

    I attribute the solution to this question url

    Thread Starter mgatten

    (@mgatten)

    Thanks for the pointer but, sadly, I’d already found and tried that. My skus really didn’t exist already, anywhere in the database. (I even tried using a tool that let me search through every field of every table in the entire database for the skus, just in case some auxiliary table with unknown field names was somehow getting involved. The skus didn’t exist anywhere.

    I had the same issue and used a solution such as :

    SELECT * FROM wp_postmeta WHERE meta_key LIKE ‘_sku’ AND meta_value = ‘NTW-14-1’

    NTW-14-1 being the SKU and then I ran:

    SELECT * FROM wp_posts WHERE ID = 4955

    Deleted both results from both queries.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Variation SKU must be unique — but it is!’ is closed to new replies.