WooCommerce checkout, place order even with disabled=true

655 Views Asked by At

Is it possible in Woocommerce checkout to send a order when using:

$fields['billing']['billing_company']['custom_attributes']          = array('disabled' => true);

The thing is I have some fields I don't want the users to be able to mess with, but I still want woocommerce to actually use them. But its not possible to go past the "place order" when you have a required field disabled.

1

There are 1 best solutions below

0
On BEST ANSWER

Used 1 hour trying to figure it out, 20 sec after posting on SO - i solved it :)

$fields['billing']['billing_company']['custom_attributes'] = array('readonly' => true);

disabled -> readonly