WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Query::get_endpoint_title() public WC 2.3.0

Get page title for an endpoint.

{} Это метод класса: WC_Query{}

Хуки из метода
Возвращает

Строку. The page title.

Использование

$WC_Query = new WC_Query();
$WC_Query->get_endpoint_title( $endpoint, $action );
$endpoint(строка) (обязательный)
Endpoint key.
$action(строка)
Optional action or variation within the endpoint.
По умолчанию: ''

Список изменений

С версии 2.3.0 Введена.
С версии 4.6.0 Added $action parameter.

Код WC_Query::get_endpoint_title() WC 5.6.0

public function get_endpoint_title( $endpoint, $action = '' ) {
	global $wp;

	switch ( $endpoint ) {
		case 'order-pay':
			$title = __( 'Pay for order', 'woocommerce' );
			break;
		case 'order-received':
			$title = __( 'Order received', 'woocommerce' );
			break;
		case 'orders':
			if ( ! empty( $wp->query_vars['orders'] ) ) {
				/* translators: %s: page */
				$title = sprintf( __( 'Orders (page %d)', 'woocommerce' ), intval( $wp->query_vars['orders'] ) );
			} else {
				$title = __( 'Orders', 'woocommerce' );
			}
			break;
		case 'view-order':
			$order = wc_get_order( $wp->query_vars['view-order'] );
			/* translators: %s: order number */
			$title = ( $order ) ? sprintf( __( 'Order #%s', 'woocommerce' ), $order->get_order_number() ) : '';
			break;
		case 'downloads':
			$title = __( 'Downloads', 'woocommerce' );
			break;
		case 'edit-account':
			$title = __( 'Account details', 'woocommerce' );
			break;
		case 'edit-address':
			$title = __( 'Addresses', 'woocommerce' );
			break;
		case 'payment-methods':
			$title = __( 'Payment methods', 'woocommerce' );
			break;
		case 'add-payment-method':
			$title = __( 'Add payment method', 'woocommerce' );
			break;
		case 'lost-password':
			if ( in_array( $action, array( 'rp', 'resetpass', 'newaccount' ), true ) ) {
				$title = __( 'Set password', 'woocommerce' );
			} else {
				$title = __( 'Lost password', 'woocommerce' );
			}
			break;
		default:
			$title = '';
			break;
	}

	/**
	 * Filters the page title used for my-account endpoints.
	 *
	 * @since 2.6.0
	 * @since 4.6.0 Added $action parameter.
	 *
	 * @see get_endpoint_title()
	 *
	 * @param string $title Default title.
	 * @param string $endpoint Endpoint key.
	 * @param string $action Optional action or variation within the endpoint.
	 */
	return apply_filters( 'woocommerce_endpoint_' . $endpoint . '_title', $title, $endpoint, $action );
}