Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

How to Validate Order Item Meta entered in a Woocommerce Order?

On a Woocommerce Order (edit) Page how is it possible to validate the user input for a line item meta field?

the user/shop manager adds a meta named "my_meta_key" with a value. Lets say this value needs to be in a certain format. If its not, dont update the value, ideally show this to the user.

How can i validate this? I have looked at wc_update_order_item_meta but there appears to be no hook or filter in place.

enter image description here

Comments