gform_paypal_invoice

gform_paypal_invoice

DescriptionUsageParametersExamplesSource Code

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.

發表回覆

您的郵箱地址不會被公開。 必填項已用 * 標註