Skip to main content

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​

NameTypeDescription
$field_display_valuestringFormatted field value.
$field_valuemixedRaw field value.
$field_keystringCheckout field key.
$field_argsarrayCheckout 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
);