The chkpspRestrict_E is the critical bit in this script, the id of the checkbox for Stripe. You need to use the “inspect element” function in your browser to find the equivalent id of the checkbox for Square and edit the #… selector to match.
I can’t because I don’t have Square set up on my account but I can talk you through exactly how to find it out. You need to go to the “create new client” page, then right-click (or two fingers/ctrl-click on Mac) on the relevant checkbox, then “inspect element” - or some browsers just call it “inspect”. Here’s an example with a different checkbox:
This will open either a separate popup window or a panel on one edge of your main browser window showing the HTML tree with the highlight on the element you inspected, you need to look for the id attribute:
Once you know what it is, the custom script would be
$(function() {
//Set Disable Square as Default
$(".page-clients-modify #{the id you just found}").prop("checked",true);
});
For example, if I wanted to tick the “allow attach PDF” box that I inspected above I’d say
$(function() {
//Set enable attach PDF as Default
$(".page-clients-modify #chkallowAttachPDF").prop("checked",true);
});
P.S. I’ve switched from the now deprecated $(document).ready(function() { }); style to the simpler $(function() { }); that is now recommended by the jQuery library.