- This topic has 5 replies, 4 voices, and was last updated 8 years, 4 months ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- You must be logged in to reply to this topic.
WordPress Membership Plugin
Simple Membership Plugin › Forums › Simple Membership Plugin › Can't change PayPal checkout language
Tagged: PayPal language
I get the following error when using the code supplied
syntax error, unexpected ‘ ‘ (T_STRING)
The code I’m using is:
add_filter(‘swpm_pp_payment_form_additional_fields’, ‘swpm_my_additional_fields’);
function swpm_my_additional_fields($output){
//Set the PayPal checkout page language to English
$output .= ‘<input type=”hidden” name=”lc” value=”GB” />’;
return $output;
}
Hi, thank you for reporting this issue.
I have submitted a message to the developers to investigate further.
Thank you
You need to supply “additional context,” as to where this code is being placed or called from. Also, the error message should be telling you what file and line number the problem is. Because it is a “syntax error,” it should be easy to find. It is also customary to define the function first, before using add_filter(), least WP needs the callback before you defined the function.
If you have trouble correcting it, please use:
https://simple-membership-plugin.com/paid-support-simple-membership-plugin/
Hi @Sam, just to confirm with you. The code you are using comes from the following documentation.
Thank you
The quotes that you have in the code is malformed. See how the quote characters are a little weird? That will cause PHP errors:
$output .= ‘<input type=”hidden” name=”lc” value=”GB” />’;
Make sure the quotes are straight like the following (copy and paste the code in a notepad and straighten it out):
$output .= '<input type="hidden" name="lc" value="FR" />';
Resolved.