gform_stripe_discounted_line_items_name

Description

Filter Payment with Discounts line item name used when there are coupon discounts applied to the payment using Stripe Checkout as the payment collection method.

Usage

add_filter( 'gform_stripe_discounted_line_items_name', 'your_function_name', 10, 5 );

Parameters

  • $name string

    The line item name of the discounted order.

  • $feed array

    The feed object currently being processed.

  • $submission_data array

    The customer and transaction data.

  • $form array

    The form object currently being processed.

  • $entry array

    The entry object currently being processed.

Examples

add_filter( 'gform_stripe_discounted_line_items_name', function( $name, $feed, $submission_data, $form, $entry ) {
	$name = 'Put your custom text here';
	gf_stripe()->log_debug( 'Custom line item name: ' . $name );
	return $name;
}, 10, 5 );

Placement

This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.

See also the PHP section in this article: Where Do I Put This Code?

Since

This filter was added in Stripe v3.0.3.

Source Code

This filter is located in class-gf-stripe.php.