Split Full Name at Checkout
document.addEventListener(‘DOMContentLoaded’, function () { // Select the First Name field var firstNameField = document.querySelector(‘#billing_first_name’); var lastNameField = document.querySelector(‘#billing_last_name’); if (firstNameField) { firstNameField.addEventListener(‘change’, function () { var fullName = firstNameField.value.trim(); var nameParts = fullName.split(‘ ‘); // Extract First Name and Last…Continue reading