Changing the payment description/title in PayPal #7389
Unanswered
crisbrand2024
asked this question in
Developer Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi. I would like to change the collection title/description uploaded to paypal. Ultimately, the integrated PayPal payment gateway added by default to the givewp plugin installation downloads the collection title and sends its title/description to paypal. I want to change the automatically downloaded title/description to a permanent text, it was changed to the same text repeated each time a donation was paid, i.e. simply the text "Donation". I managed to find in the path /wp-content/plugins/give/includes/gateways/paypal on line 300 the code probably responsible for the name of the collection that is downloaded to PayPal as the payment title, I want to change it to the simple text "donation":
` // Item name.
$item_name = give_payment_gateway_item_title($payment_data);
`
I tried to change it to but it doesn't work, it still downloads the title of the given fundraiser:
// Setup PayPal API params. $paypal_args = [ 'business' => give_get_option('paypal_email', false), 'first_name' => $payment_data['user_info']['first_name'], 'last_name' => $payment_data['user_info']['last_name'], 'email' => $payment_data['user_email'], 'invoice' => $payment_data['purchase_key'], 'amount' => $payment_data['price'], 'item_name' => "Donation", 'no_shipping' => '1', 'shipping' => '0', 'no_note' => '1', 'currency_code' => give_get_currency($payment_id, $payment_data), 'charset' => get_bloginfo('charset'), 'custom' => $payment_id, 'rm' => '2', 'return' => esc_url_raw( $return_url ), 'cancel_return' => give_get_failed_transaction_uri(), 'notify_url' => $listener_url, 'page_style' => give_get_paypal_page_style(), 'cbt' => get_bloginfo('name'), 'bn' => 'givewp_SP', ];
Beta Was this translation helpful? Give feedback.
All reactions