wc_get_template_html( string $template_name, array $args = array(), string $template_path = '', string $default_path = '' )

Like wc_get_template, but returns the HTML instead of outputting.

Description Description

See also See also

Top ↑

Parameters Parameters


(Required) Template name.


(Optional) Arguments. (default: array).

Default value: array()


(Optional) Template path. (default: '').

Default value: ''


(Optional) Default path. (default: '').

Default value: ''

Top ↑

Return Return


Top ↑

Source Source

File: includes/wc-core-functions.php

function wc_get_template_html( $template_name, $args = array(), $template_path = '', $default_path = '' ) {
	wc_get_template( $template_name, $args, $template_path, $default_path );
	return ob_get_clean();

Top ↑

Changelog Changelog

Version Description
2.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.