woocommerce_feature_description_tip
Filter to customize the description tip that appears under the description of each feature in the features settings page.
Использование
add_filter( 'woocommerce_feature_description_tip', 'wp_kama_woocommerce_feature_description_tip_filter', 10, 3 );
/**
* Function for `woocommerce_feature_description_tip` filter-hook.
*
* @param string $desc_tip The original description tip.
* @param string $feature_id The id of the feature for which the description tip is being customized.
* @param bool $disabled True if the UI currently prevents changing the enable/disable status of the feature.
*
* @return string
*/
function wp_kama_woocommerce_feature_description_tip_filter( $desc_tip, $feature_id, $disabled ){
// filter...
return $desc_tip;
}
- $desc_tip(строка)
- The original description tip.
- $feature_id(строка)
- The id of the feature for which the description tip is being customized.
- $disabled(true|false)
- True if the UI currently prevents changing the enable/disable status of the feature.
Список изменений
| С версии 7.1.0 | Введена. |
Где вызывается хук
woocommerce/src/Internal/Features/FeaturesController.php 1374
$desc_tip = apply_filters( 'woocommerce_feature_description_tip', $desc_tip, $feature_id, $disabled );