Skip to main content

fc_expansible_section_toggle_label_{section_id}

Type: Filter

Filters the toggle label of an expansible section.

The dynamic portion of the hook name, $section_id, refers to the expansible section ID. Possible hook names include:

  • fc_expansible_section_toggle_label_coupon_code

Signature​

apply_filters( 'fc_expansible_section_toggle_label_{section_id}', $value );

Parameters​

NameTypeDescription
$valuestringValue to filter.

Since​

  • 2.0.5

Source: inc/checkout-coupon-codes.php

Examples​

In fc_expansible_section_toggle_label_{section_id}, coupon_code replaces {section_id}.

add_filter( 'fc_expansible_section_toggle_label_coupon_code',
/**
* Customize coupon code toggle label.
*
* @param string $value Value to filter.
* @return string Filtered value.
*/
function( $value ) {
return __( 'Have a discount code?', 'my-theme' );
},
10
);