gform_product

Description

The gform_product filter allows developers to modify the “Product” heading displayed when displaying the order information grid on the entry detail page and notification emails.

Usage

add_filter( 'gform_product', 'change_product', 10, 2 );

Parameters

ParameterTypeDescription
$labelstringThe label to be filtered.
$form_idintegerThe current form’s id.

Examples

Change the default Product label.

add_filter( 'gform_product', 'change_product', 10, 2 );
function change_product( $label, $form_id ) {
	return 'Services';
}

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?

Source Code

This filter is located in the following methods:

  • GFCommon::get_submitted_pricing_fields() in common.php
  • GFEntryDetail::lead_detail_grid() in entry_detail.php