fc_pro_thwcfe_substep_text_display_value_{field_key}
Type: Filter
Filters the displayed value of a Checkout Field Editor field by field key.
The dynamic portion of the hook name, $field_key, is the checkout field key.
Signatureā
apply_filters( 'fc_pro_thwcfe_substep_text_display_value_{field_key}', $field_display_value, $field_value, $field_key, $field_args );
Parametersā
| Name | Type | Description |
|---|---|---|
$field_display_value | string | Formatted field value. |
$field_value | mixed | Raw field value. |
$field_key | string | Checkout field key. |
$field_args | array | Checkout field arguments. |
Sinceā
1.2.0
Source: inc/compat/plugins/compat-plugin-woocommerce-checkout-field-editor-pro.php
Examplesā
In fc_pro_thwcfe_substep_text_display_value_{field_key}, delivery_notes replaces {field_key}.
add_filter( 'fc_pro_thwcfe_substep_text_display_value_delivery_notes',
/**
* Customize display value for a specific custom field.
*
* @param string $field_display_value Formatted field value.
* @param mixed $field_value Raw field value.
* @param string $field_key Checkout field key.
* @param array $field_args Checkout field arguments.
* @return string Filtered value.
*/
function( $field_display_value, $field_value, $field_key, $field_args ) {
// Add icon before delivery notes
return 'š¦ ' . $field_display_value;
},
10,
4
);