Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Last active January 17, 2017 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshfeck/b67d87256f29599abefa5ebc2de3dad2 to your computer and use it in GitHub Desktop.
Save joshfeck/b67d87256f29599abefa5ebc2de3dad2 to your computer and use it in GitHub Desktop.
Set the item number that's sent to PayPal using PayPal Express. Requires Event Espresso 4.9.26.p
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_filter(
'FHEE__EEG_Paypal_Express__set_redirection_info__arguments',
'express_ee_add_paypal_item_id'
);
function express_ee_add_paypal_item_id( $token_request_dtls ) {
$checkout = EE_Registry::instance()->SSN->checkout();
if ( $checkout instanceof EE_Checkout ) {
$token_request_dtls['L_PAYMENTREQUEST_0_NUMBER0'] = '7777';
}
return $token_request_dtls;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment