Description
This filter allows the invoice number, sent to PayPal for the PayPal Standard Add-on, to be changed.
Usage
add_filter( 'gform_paypal_invoice', 'your_function_name', 10, 3 );
Parameters
- $invoice_id integer
Empty string.
-
$form Form Object
The form from which the PayPal transaction was submitted.
-
$entry Entry Object
The entry used to generate the PayPal transaction.
Examples
This example shows how to use the $entry ID as the invoice ID.
add_filter( 'gform_paypal_invoice', 'change_invoice', 10, 3 ); function change_invoice( $invoice_id, $form, $entry ) { return rgar( $entry, 'id' ); }
Source Code
This filter is located in GFPayPal::redirect_url() in class-gf-paypal.php.