• Resolved chirag007

    (@chirag007)


    How do I change the WooCommerce Shipping weight field to accept letters so that I can put values such as:

    500g / 1kg / 750ml / 2L

    There is no use for the weight other than to display the mass, no shipping is required.

    I’ve searched through the WooCommerce files but I can’t find where it’s set. Can someone point me to the file that controls this field?`

Viewing 1 replies (of 1 total)
  • Plugin Support Kaushik S. a11n

    (@kaushiksomaiya)

    Hi there!

    Thank you for contacting us! ??

    I understand you’d like to use units in the weight input field.

    It isn’t advisable to modify this behavior because plugins depending on this field may not work as expected.

    You can instead hide the original weight from the product page:

    add_filter( 'woocommerce_product_get_weight' , '__return_false' );

    and then use attributes to define custom weight:

    I hope this helps! ??

Viewing 1 replies (of 1 total)
  • The topic ‘Change the WooCommerce Weight field to accept letters’ is closed to new replies.