woocommerce_endpoint_(endpoint)_title
Filters the page title used for my-account endpoints.
Использование
add_filter( 'woocommerce_endpoint_(endpoint)_title', 'wp_kama_woocommerce_endpoint_title_filter', 10, 3 );
/**
* Function for `woocommerce_endpoint_(endpoint)_title` filter-hook.
*
* @param string $title Default title.
* @param string $endpoint Endpoint key.
* @param string $action Optional action or variation within the endpoint.
*
* @return string
*/
function wp_kama_woocommerce_endpoint_title_filter( $title, $endpoint, $action ){
// filter...
return $title;
}
- $title(строка)
- Default title.
- $endpoint(строка)
- Endpoint key.
- $action(строка)
- Optional action or variation within the endpoint.
Список изменений
| С версии 2.6.0 | Введена. |
| С версии 4.6.0 | Added $action parameter. |
Где вызывается хук
woocommerce_endpoint_(endpoint)_title
woocommerce/includes/class-wc-query.php 179
return apply_filters( 'woocommerce_endpoint_' . $endpoint . '_title', $title, $endpoint, $action );