wc_get_template_html()
Like wc_get_template, but returns the HTML instead of outputting.
No Hooks.
Returns
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
| See: wc_get_template |
Changelog
| Since 2.5.0 | Introduced. |
wc_get_template_html() wc get template html code WC 11.0.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();
}