Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Setting a Default Country Value | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium Setting a Default Country Value

Setting a Default Country Value

Posted: March 21, 2014 at 8:42 am

Viewing 2 reply threads


Michael Palmer

March 21, 2014 at 8:42 am

Hi Support

We would like pass a default country value through to worldpay when making a payment (99.9% of our customers are UK based).

The tag we would like to pass is:
<input type=”hidden” value=”GB” name=”country”>

Manually adding this to the payment overview page (using firebug) works perfectly but we are unsure where to edit the actual payment form to make this change permanent.

Many thanks
Michael


Anonymous

March 21, 2014 at 9:10 am

Hi Michael,

You can add this to the WorldPay payment gateway itself.

Go to plugins/event-espresso/gateways/ and copy the WorldPay directory.

Upload that to wp-conent/uploads/espresso/gateways/

Within that new directory open up worldpay_vars.php and add:

$myworldpay->addField('country', 'GB');

I added this around line 30, straight after the line:

$myworldpay->addField('MC_callback', get_permalink($org_options['return_url']));

This will then output something like this when selecting WorldPay as a payment option. http://take.ms/5c5IQ

Hope that helps :)


Michael Palmer

March 21, 2014 at 9:38 am

Hi Tony

Works perfectly :)

Thank you!

Viewing 2 reply threads

The support post ‘Setting a Default Country Value’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso - Staging Server