Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Craig

    (@hirecraigm)

    It appears that we do not know how to do this in Woocommerce.

    I assume you have too many products to do this individually. If you have access to phpMyAdmin, you could run MySql commands like this:

    UPDATE wp_postmeta SET meta_value='0' WHERE meta_key='_weight'
    UPDATE wp_postmeta SET meta_value='0' WHERE meta_key='_height'
    UPDATE wp_postmeta SET meta_value='0' WHERE meta_key='_width'
    UPDATE wp_postmeta SET meta_value='0' WHERE meta_key='_length'

    The table name and field names will need to be enclosed in backticks but the forum text filter won’t let me show those.

    Thread Starter Craig

    (@hirecraigm)

    Thanks!

    I added the Backticks (left of the number 1 key on the keyboard) and a semicolon on the end of each line.

    The results are below.

    It took a little learning for me but the UPDATE statements were exactly what I was needing. I was focusing too much on needing SELECT statements.

    I poked around looking at the file structure as well. Thanks I learned a lot thanks to you priming the pump!

    Craig

    UPDATE wp_postmeta SET meta_value=’0′ WHERE meta_key=’_weight’;# 1120 rows affected.

    UPDATE wp_postmeta SET meta_value=’0′ WHERE meta_key=’_height’;# 1366 rows affected.

    UPDATE wp_postmeta SET meta_value=’0′ WHERE meta_key=’_width’;# 1497 rows affected.

    UPDATE wp_postmeta SET meta_value=’0′ WHERE meta_key=’_length’;# 1184 rows affected.

    Thread Starter Craig

    (@hirecraigm)

    Now that my fields have 0 values, my data entry is three times as fast. You helped eliminate a lot of poor quality data.

    Thanks Again, Craig

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Make all Weight, Height, Width & Length entries zero’ is closed to new replies.