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

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

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

Syntax – سینتکس

(string) wc_get_attribute_type_label( (string) $type ); 

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

  • 1- $type (string)

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

if ( !function_exists( 'wc_get_attribute_type_label' ) ) { 
    require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-attribute-functions.php'; 
} 
  
// Attribute type slug. 
$type = ''; 
  
// NOTICE! Understand what this does before running. 
$result = wc_get_attribute_type_label($type); 
    

Defined – محل تعریف

/includes/wc-attribute-functions.php

function wc_get_attribute_type_label( $type ) { 
    $types = wc_get_attribute_types(); 
 
    return isset( $types[ $type ] ) ? $types[ $type ] : ucfirst( $type ); 
} 

versions – نسخه ها

از نسخه : 3.0.0

نسخه فعلی : 3.0.6

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

ارسال نظر

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

contact us