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.

Getting address values from Pro forms

Home Forums Community Forum Getting address values from Pro forms

This topic contains 1 reply, has 2 voices. Last updated by  Cristián Lávaque 4 years, 5 months ago.

Topic Author Topic
Posted: Tuesday Jul 31st, 2012 at 5:42 am #20755

Is it possible and if so how do i get values filled in the payment forms and use it on the next step of the signup process. I have another form where the user has to fill in more details about themselves and we need to pull the address and country name they filled in previously while processing the payment.

Something like:

%%country%%
%%zip_code%%

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Tuesday Jul 31st, 2012 at 7:59 am #20777

Hi Thomas.

Well, here’s this line from s2member-pro\includes\classes\gateways\paypal\paypal-form-in.inc.php:

[hilite pre_code]
$code = preg_replace("/%%zip_value%%/", c_ws_plugin__s2member_utils_strings::esc_ds(format_to_edit($_p["s2member_pro_paypal_update"]["zip"])), $code);
[/hilite]

There you can see that it populates the zip code from the [hilite mono]$_POST[/hilite] array ([hilite mono]$_p[/hilite] is a sanitized copy of it). So you can populate [hilite mono]$_POST["s2member_pro_paypal_update"][/hilite][“zip”] with the value you want.

You’d some something similar for country using [hilite mono]$_POST["s2member_pro_paypal_update"]["country"][/hilite].

I haven’t tested either one, but it’s a good place to start looking.

I hope that helps. :)

Viewing 1 replies (of 1 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.