gform_product_unitprice

gform_product_unitprice

DescriptionUsageParametersExamplesPlacementSource Code

Description
This filter is executed when displaying the order information grid on the entry detail page and notification emails. Use this filter to modify the 「Unit Price」 heading.
Usage
1add_filter( 'gform_product_unitprice', 'change_unitprice', 10, 2 );
Parameters

$label string
The label to be filtered.

$form_id integer
The current form』s id.

Examples
This example changes the default Unit Price label:
1234add_filter( 'gform_product_unitprice', 'change_unitprice', 10, 2 );function change_unitprice( $label, $form_id ) {    return 'Sub Total';}
Placement
This code should be placed in the functions.php file of your active theme.
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

發表回覆

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