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

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

تابع ووکامرسی wc_get_product_tag_list – دریافت و نمایش لیست تگ های محصول

Syntax – سینتکس

(string) wc_get_product_tag_list( (int) $product_id, (string) $sep = ', ', (string) $before = '', (string) $after = '' ); 

Parameters – پارامتر ها (4)

  • 1- $product_id (int)
  • 2- $sep (string)
  • 3- $before (string)
  • 4- $after (string)

Usage – نحوه استفاده

if ( !function_exists( 'wc_get_product_tag_list' ) ) { 
    require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-product-functions.php'; 
} 
  
// The product id. 
$product_id = -1; 
  
// (default: ', '). 
$sep = ', '; 
  
// (default: ''). 
$before = ''; 
  
// (default: ''). 
$after = ''; 
  
// NOTICE! Understand what this does before running. 
$result = wc_get_product_tag_list($product_id, $sep, $before, $after); 
    

Defined – محل تعریف

/includes/wc-product-functions.php

function wc_get_product_tag_list( $product_id, $sep = ', ', $before = '', $after = '' ) { 
    return get_the_term_list( $product_id, 'product_tag', $before, $sep, $after ); 
} 

versions – نسخه ها

از نسخه : 3.0.2

نسخه فعلی : 3.0.6

دیگر نسخه ها : 3.0.6 , 3.0.5 , 3.0.4 , 3.0.3 , 3.0.2

ارسال نظر

جهت استفاده از کد حتما از تگ pre استفاده نمایید .

contact us