Created
April 29, 2015 22:19
-
-
Save jondcampbell/756d6baf0ab3e1b3639c to your computer and use it in GitHub Desktop.
disable the billing fields at woocommerce checkout.
sadly it doesnt add to your custom attributes, it just replaces them with disabled.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function custom_disable_woocommerce_billing_checkout_fields( $fields ) { | |
foreach ($fields['billing'] as $key => $billing_field){ | |
$fields['billing'][$key]['custom_attributes'] = array('disabled' => 'disabled') ; | |
} | |
return $fields; | |
} | |
add_filter( 'woocommerce_checkout_fields' , 'custom_disable_woocommerce_billing_checkout_fields' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment