Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // WooCommerce - Make checkout fields readonly
- add_action( 'woocommerce_checkout_fields', 'readonly_billing_last_name', 10, 1 );
- function readonly_billing_last_name( $checkout_fields ) {
- $checkout_fields['billing']['billing_first_name']['custom_attributes'] = array( 'readonly' => 'readonly' );
- $checkout_fields['billing']['billing_last_name']['custom_attributes'] = array( 'readonly' => 'readonly' );
- return $checkout_fields;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement