Hello,
I read that I should post the following code in my functions.php file on my wordpress site to change the language PayPal is displayed in when a donation form is submitted:
add_filter( ‘gform_paypal_query’, ‘update_paypal_query’, 10, 3 );
function update_paypal_query( $query_string, $form_id, $entry ) {
if ( $form_id == 7 ) {
$query_string .= ‘&lc=zh_CN’;
} else {
$query_string .= ‘&lc=en_US’;
}
return $query_string;
}
The only thing I changed was the form ID (to match my form) and the first language code in the if statement to Chinese. The problem is that this code breaks my site. Is there a mistake in the code somewhere? Did I misunderstand something?
Andrew