I need to set a default value for the region(state) in the checkout page.
tried it using jQuery. it’s showing the value the field but it’s not saving.
require([ 'jquery', 'jquery/ui'], function($ ){ setInterval(function () { if($ ('input[name="city"]').val() != 'Perth') { $ ('input[name="city"]').val("Perth"); $ ('input[name="city"]').attr('readonly',true); $ ('input[name="city"]').trigger('keyup'); $ ('input[name="region"]').val("WA"); $ ('input[name="region"]').attr('readonly',true); $ ('input[name="region"]').trigger('keyup'); } },3000); });
https://prnt.sc/i1jvx6
when I click save it not saving the region(state)
https://prnt.sc/i1jwgf
can anyone help me? it’s urgent
Thanks in advance.