fc_expansible_section_toggle_label_{key}_add_optional_text
Type: Filter
Filters whether to append the "optional" text to one expansible section toggle label.
The dynamic portion of the hook name, $key, refers to the checkout field key for that optional field. This runs in addition to fc_expansible_section_toggle_label_add_optional_text, which applies to every optional field.
Signature
apply_filters( 'fc_expansible_section_toggle_label_{key}_add_optional_text', $value );
Parameters
| Name | Type | Description |
|---|---|---|
$value | bool | Value to filter. Default true. |
Since
2.0.2
Source: inc/checkout-hide-optional-fields.php
Examples
In fc_expansible_section_toggle_label_{key}_add_optional_text, shipping_company replaces {key}.
add_filter( 'fc_expansible_section_toggle_label_shipping_company_add_optional_text',
/**
* Remove optional text from shipping_company toggle label.
*
* @param bool $value Value to filter. Default true.
* @return bool Filtered value.
*/
function( $value ) {
return false;
},
10
);