تابع ووکامرسی wc_get_template_html نمایش کد HTML دیگر صفحات فروشگاه

تابع ووکامرسی wc_get_template_html – نمایش کد HTML دیگر صفحات فروشگاه
Syntax – سینتکس
wc_get_template_html( (string) $template_name, (array) $args = array(), (string) $template_path = '', (string) $default_path = '' );
Parameters – پارامتر ها (4)
- 1- $template_name (string)
- 2- $args (array)
- 3- $template_path (string)
- 4- $default_path (string)
Usage – نحوه استفاده
if ( !function_exists( 'wc_get_template_html' ) ) {
require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-core-functions.php';
}
// The template name.
$template_name = '';
// The args.
$args = array();
// The template path.
$template_path = '';
// The default path.
$default_path = '';
// NOTICE! Understand what this does before running.
$result = wc_get_template_html($template_name, $args, $template_path, $default_path);
Defined – محل تعریف
/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();
}
versions – نسخه ها
از نسخه : 2.5.0
نسخه فعلی : 3.0.6
دیگر نسخه ها : 3.0.6 , 3.0.5 , 3.0.4 , 3.0.3 , 3.0.2
ارسال نظر