wc_get_template_html()WC 2.5.0

Like wc_get_template, but returns the HTML instead of outputting.

No Hooks.

Return

String.

Usage

wc_get_template_html( $template_name, $args, $template_path, $default_path );
$template_name(string) (required)
Template name.
$args(array)
Arguments. .
Default: array)
$template_path(string)
Template path. ..
Default: ''
$default_path(string)
Default path. ..
Default: ''

Notes

Changelog

Since 2.5.0 Introduced.

wc_get_template_html() code WC 8.6.1

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();
}