Automattic\WooCommerce\Blocks\BlockTypes

CustomerAccount::render_label()privateWC 1.0

Gets the label to render depending on the displayStyle.

Метод класса: CustomerAccount{}

Хуков нет.

Возвращает

Строку. Label to render on the block.

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

// private - только в коде основоного (родительского) класса
$result = $this->render_label( $attributes );
$attributes(массив) (обязательный)
Block attributes.

Код CustomerAccount::render_label() WC 8.7.0

private function render_label( $attributes ) {
	if ( self::ICON_ONLY === $attributes['displayStyle'] ) {
		return '';
	}

	return get_current_user_id()
		? __( 'My Account', 'woocommerce' )
		: __( 'Login', 'woocommerce' );
}