JS [Paid Member Subscriptions & Profile Builder]: Display State Field Before Country Field on Billing Form
document.addEventListener(‘DOMContentLoaded’, function() { var stateField = document.querySelector(‘.pms-billing-state’); var countryField = document.querySelector(‘.pms-billing-country’); var stateLabel = document.querySelector(‘label[for=”pms_billing_state”]’); if (stateField && countryField) { // Insert the stateField before the countryField countryField.parentNode.insertBefore(stateField, countryField); stateLabel.classList.add(“billing_state_style”); } });Continue reading