Adding placeholder text field to woocommerce checkout [closed]

Add the code in your themes functions.php.

add_filter( 'woocommerce_checkout_fields' , 'override_billing_checkout_fields', 20, 1 );

function override_billing_checkout_fields( $fields ) {
    $fields['billing']['billing_first_name']['placeholder'] = 'Enter First Name';
    $fields['billing']['billing_last_name']['placeholder'] = 'Enter Last Name';
    return $fields;
}

Solved by adding the code in this way