This sample coding can be added to your child theme’s functions.php file (do not include the opening php tag) or a site specific plugin:
http://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/
123 should be changed to your page ID of your actual registration checkout page. This can be found by going to your WP dashboard and clicking on the registration checkout WordPress page. The ID appears at the end of the URL.
For example, if the ID for your registration checkout page was 1357, then you should use that value in the sample coding instead of 123.
Add the sample code below to your child theme's functions.php file or in a site specific plugin.
<?php
//* Do NOT include the opening php tag
//* Disable the first name and last name fields during registration checkout
function ee_disable_name_fields_registration_checkout() {
if ( is_page( 123 ) ) {
?>
<script>
jQuery(document).ready( function($) {
jQuery("input[id$=-fname]").prop( "readonly", true );
jQuery("input[id$=-lname]").prop( "readonly", true );
});
</script>
<?php
}
}
add_action('wp_footer', 'ee_disable_name_fields_registration_checkout');
References:
https://learn.jquery.com/using-jquery-core/faq/how-do-i-disable-enable-a-form-element/
https://eventespresso.com/topic/text-field-read-only-saving-inputs/