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.

Changing Language on PayPalPro Form

Home Forums Community Forum Changing Language on PayPalPro Form

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

Topic Author Topic
Posted: Tuesday Apr 23rd, 2013 at 7:45 pm #48231
Rebecca
Username: rebeccaz

I attempted to follow the direction Jason outlined on this post to change the language on my order from from “Submit Form” to Submit Order”

Here is what is in my ‘s2member-o.php’ file uploaded to the ‘mu-plugins’ folder, yet my form still reads “Submit Form”. What am I missing? Do I have to call to the file in my header code? Is there another way to make this simple text edit?

<?php
add_filter('gettext_with_context', 's2_translator', 10, 4);
function s2_translator($translated, $original, $context, $text_domain)
{
if($context === 's2member-front' && $text_domain=== 's2member')
{
if($original === 'Apply Coupon')
$translated = 'Submit Coupon';
else if($original === 'Submit Form')
$translated = 'Submit Order';
}
return $translated; // Return final translation.
}

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Wednesday Apr 24th, 2013 at 7:10 am #48273

That’s weird. I just tried it in my test installation and it worked fine for me.

[hilite pre_code]
add_filter('gettext_with_context', 's2_translator', 10, 4);
function s2_translator($translated, $original, $context, $text_domain)
{
if($context === 's2member-front' && $text_domain === 's2member')
{
if($original === 'Apply Coupon')
$translated = 'Submit Coupon';
else if($original === 'Submit Form')
$translated = 'Submit';
}
return $translated; // Return final translation.
}
[/hilite]

Have you tried these? Knowledge Base » Common Troubleshooting Tips

Posted: Wednesday Apr 24th, 2013 at 12:04 pm #48289
Rebecca
Username: rebeccaz

Cristián

Thanks for your second set of eyes on the code. I think it must have been a cashing issue, because now I see the changed language on the order form. My host is WP-Engine and they have server side cashing to make WP run faster. Thanks for you help, the code worked after all!

-Rebecca

Posted: Thursday Apr 25th, 2013 at 7:13 am #48339

Great! Thanks for the update. :)

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