Membership Plugin

WordPress Membership Plugin

  • Home
  • Documentation
  • Addons
  • Support
    • Quick Setup
    • Documentation
    • Premium Addon Support
    • Paid Support
    • Support Forum
    • Support Forum Search
    • Forum Login
    • Forum Registration
  • Contact

[Resolved] Can't change PayPal checkout language

Simple Membership Plugin › Forums › Simple Membership Plugin › Can't change PayPal checkout language

Tagged: PayPal language

  • This topic has 5 replies, 4 voices, and was last updated 8 years, 4 months ago by Sam.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • March 4, 2018 at 10:45 am #13556
    Sam
    Participant

    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;
    }

    March 5, 2018 at 6:48 am #13568
    mbrsolution
    Moderator

    Hi, thank you for reporting this issue.

    I have submitted a message to the developers to investigate further.

    Thank you

    March 5, 2018 at 4:57 pm #13572
    The Assurer
    Moderator

    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/

    March 5, 2018 at 11:22 pm #13579
    mbrsolution
    Moderator

    Hi @Sam, just to confirm with you. The code you are using comes from the following documentation.

    Thank you

    March 7, 2018 at 6:58 am #13593
    admin
    Keymaster

    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" />';
    
    March 13, 2018 at 9:32 pm #13692
    Sam
    Participant

    Resolved.

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Log In

Please read this message before using our plugin.

Search

Featured Addons and Extensions

  • Membership Form Builder Addon
  • Member Directory Listing Addon
  • WooCommerce Payment Integration
  • Member Data Exporter Addon

Documentation

  • Documentation Index Page

Copyright © 2026 | Simple Membership Plugin | Privacy Policy