Automattic\WooCommerce\Blocks\BlockTypes
CustomerAccount::render_label()
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() CustomerAccount::render label WC 7.7.2
private function render_label( $attributes ) { if ( self::ICON_ONLY === $attributes['displayStyle'] ) { return ''; } return get_current_user_id() ? __( 'My Account', 'woocommerce' ) : __( 'Login', 'woocommerce' ); }