gpecf_order_labels

  1. Description
  2. Usage
  3. Example
    1. Modify Order Labels
  4. Since

Description

Filter the labels used in the order summary.

Usage

Apply to all forms.

add_filter( 'gpecf_order_labels', 'my_custom_function' );
Apply to a specific form.

add_filter( 'gpecf_order_labels_FORMID', 'my_custom_function' );

## Parameters – **labels** [array]() – **$order** [string]() The label of the order summary which display in the Entry Detail view and in the {all_fields} output. – **$product** [string]() The label of the order summary’s Product column. – **$quantity** [string]() The label of the order summary’s Quantity column. – **$unit_price** [string]() The label of the order summary’s Unit Price column. – **$price** [string]() The label of the order summary’s Price column. – **$subtotal** [string]() The label of the order summary’s Subtotal row. – **$total** [string]() The label of the order summary’s Total row.

Example

Modify Order Labels

In this example, the Product, Quantity, and Subtotal labels are replaced with alternate phrasing.

add_filter( 'gpecf_order_labels', function( $labels ) {
	$labels['product']  = 'Item';
	$labels['quantity'] = 'Count';
	$labels['subtotal'] = 'Price Before Tax';
	return $labels;
} );

Since

This filter is available since Gravity Forms eCommerce Fields 1.0.