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

$template_name

(Required) Template name.

$args

(Optional) Arguments. (default: array).

Default value: array()

$template_path

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

Default value: ''

$default_path

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

Default value: ''


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/wc-core-functions.php

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

Top ↑

Changelog 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.