woocommerce_endpoint_(endpoint)_title
Filters the page title used for my-account endpoints.
Usage
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(string)
- Default title.
- $endpoint(string)
- Endpoint key.
- $action(string)
- Optional action or variation within the endpoint.
Changelog
| Since 2.6.0 | Introduced. |
| Since 4.6.0 | Added $action parameter. |
Where the hook is called
woocommerce_endpoint_(endpoint)_title
woocommerce/includes/class-wc-query.php 180
return apply_filters( 'woocommerce_endpoint_' . $endpoint . '_title', $title, $endpoint, $action );
Where the hook is used in WooCommerce
woocommerce/src/Internal/OrderWithdrawal/OrderWithdrawalController.php 67
add_filter( 'woocommerce_endpoint_' . self::ENDPOINT_KEY . '_title', array( $this, 'get_endpoint_title' ), 10, 1 );
woocommerce/src/Internal/ShopperLists/ShopperListsController.php 101
add_filter( 'woocommerce_endpoint_' . $endpoint . '_title', array( $this, 'wishlist_endpoint_title' ) );