latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

International State Field Limitation

Home Forums Community Forum International State Field Limitation

This topic contains 7 replies, has 3 voices. Last updated by  Cristián Lávaque 4 years, 3 months ago.

Topic Author Topic
Posted: Tuesday Sep 18th, 2012 at 11:55 am #25701

Please give me the code and/or settings required to increase the maxlength of the state field on an authorize.net payment form. It forces it to only 2 characters, and some international states/regions have more than 2 characters.

Thanks,

Jeffry

List Of Topic Replies

Viewing 7 replies - 1 through 7 (of 7 total)
Author Replies
Author Replies
Posted: Wednesday Sep 19th, 2012 at 6:10 am #25754
Raam Dev
Username: Raam
Staff Member

Jeffry,

You can change the maxlength of that field by editing the Pro-Form template for Authroize.net Checkouts: wp-content/plugins/s2member-pro/includes/templates/forms/authnet-checkout-form.php. Search for “state” then you’ll find the code that creates that field. You can change the maxlength there.

Posted: Wednesday Sep 19th, 2012 at 10:37 am #25804

I already did that. But I want a solution that will survive the next s2member update.

Please help.

Posted: Thursday Sep 20th, 2012 at 5:52 am #25893
Raam Dev
Username: Raam
Staff Member

You should be able to copy that modified file to wp-content/mu-plugins/ and it will automatically overwrite the one provided by s2Member. That will survive upgrades.

Posted: Thursday Sep 20th, 2012 at 10:45 am #25956

Doing that added the form to the top of the home page (and I assume, every other page, but I didn’t check).

Posted: Thursday Sep 20th, 2012 at 10:05 pm #26000
Raam Dev
Username: Raam
Staff Member

Apologies for the confusion, Jeffry. I was mistaken about how this worked.

If you want to modify one of the templates, simply copy the modified template to your theme directory and then in your Pro-Form shortcode, add template=”modified-template-filename.php”.

So for example, you could simply copy wp-content/plugins/s2member-pro/includes/templates/forms/authnet-checkout-form.php to your theme directory, modify it, and then add template=”authnet-checkout-form.php” to the Pro-Form shortcode. That would tell s2Member to use your modified template when generating the form.

Posted: Wednesday Oct 3rd, 2012 at 3:25 pm #27358

I’m sorry to be a thorn in your side, but I tried this, and it’s not working. The checkout form still pulls the original template from the s2member files.

Thanks,

Jeffry

Posted: Thursday Oct 4th, 2012 at 6:56 am #27406

Jeffry, what directory did you copy the template file to? It should be wp-content or the directory of the theme you’re using (not a child one, and not the themes directory either).

Jason Caldwell said:

Pro Form templates can appear in the following locations represented by WordPress PHP Constants.

[hilite code]TEMPLATEPATH[/hilite]
[hilite code]WP_CONTENT_DIR[/hilite]

If a template exists in both locations, the template inside [hilite mono]WP_CONTENT_DIR[/hilite] will be used, as it has the highest precedence.

Example: /wp-content/themes/my-theme/paypal-checkout-form.php
Example: /wp-content/paypal-checkout-form.php

I hope it helps.

Viewing 7 replies - 1 through 7 (of 7 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.