تابع ووکامرسی wc_get_coupon_type دریافت نام نوع کوپن

تابع ووکامرسی wc_get_coupon_type دریافت نام نوع کوپن

تابع ووکامرسی wc_get_coupon_type – دریافت نام نوع کوپن

Syntax – سینتکس

(string) wc_get_coupon_type( (string) $type = '' ); 

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

  • 1- $type (string)

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

if ( !function_exists( 'wc_get_coupon_type' ) ) { 
    require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-coupon-functions.php'; 
} 
  
// (default: '') 
$type = ''; 
  
// NOTICE! Understand what this does before running. 
$result = wc_get_coupon_type($type); 
    

Defined – محل تعریف

/includes/wc-coupon-functions.php

function wc_get_coupon_type( $type = '' ) { 
    $types = wc_get_coupon_types(); 
    return isset( $types[ $type ] ) ? $types[ $type ] : ''; 
} 

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