wc_get_template_html()
Like wc_get_template, but returns the HTML instead of outputting.
Хуков нет.
Возвращает
Строку.
Использование
wc_get_template_html( $template_name, $args, $template_path, $default_path );
- $template_name(строка) (обязательный)
- Template name.
- $args(массив)
- Arguments. .
По умолчанию: array) - $template_path(строка)
- Template path. .
По умолчанию: '' - $default_path(строка)
- Default path. .
По умолчанию: ''
Заметки
- Смотрите: wc_get_template
Список изменений
| С версии 2.5.0 | Введена. |
Код wc_get_template_html() wc get template html WC 10.4.0
function wc_get_template_html( $template_name, $args = array(), $template_path = '', $default_path = '' ) {
ob_start();
wc_get_template( $template_name, $args, $template_path, $default_path );
return ob_get_clean();
}