PHP Класс WC_Legacy_Coupon

Legacy and deprecated functions are here to keep the WC_Legacy_Coupon class clean. This class will be removed in future versions.
Автор: WooThemes
Наследование: extends WC_Data
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__get ( string $key ) : mixed Magic __get method for backwards compatibility. Maps legacy vars to new getters.
__isset ( string $key ) : boolean Magic __isset method for backwards compatibility. Legacy properties which could be accessed directly in the past.
apply_before_tax ( ) : boolean Check if coupon needs applying before tax.
dcr_usage_count ( string $used_by = '' ) Decrease usage count for current coupon.
enable_free_shipping ( ) : boolean Check if a coupon enables free shipping.
exclude_sale_items ( ) : boolean Check if a coupon excludes sale items.
format_array ( string | array $array ) : array Format loaded data as array.
inc_usage_count ( string $used_by = '' ) Increase usage count for current coupon.

Описание методов

__get() публичный Метод

Magic __get method for backwards compatibility. Maps legacy vars to new getters.
public __get ( string $key ) : mixed
$key string
Результат mixed

__isset() публичный Метод

Magic __isset method for backwards compatibility. Legacy properties which could be accessed directly in the past.
public __isset ( string $key ) : boolean
$key string
Результат boolean

apply_before_tax() публичный Метод

Check if coupon needs applying before tax.
public apply_before_tax ( ) : boolean
Результат boolean

dcr_usage_count() публичный Метод

Decrease usage count for current coupon.
public dcr_usage_count ( string $used_by = '' )
$used_by string Either user ID or billing email

enable_free_shipping() публичный Метод

Check if a coupon enables free shipping.
public enable_free_shipping ( ) : boolean
Результат boolean

exclude_sale_items() публичный Метод

Check if a coupon excludes sale items.
public exclude_sale_items ( ) : boolean
Результат boolean

format_array() публичный Метод

Format loaded data as array.
public format_array ( string | array $array ) : array
$array string | array
Результат array

inc_usage_count() публичный Метод

Increase usage count for current coupon.
public inc_usage_count ( string $used_by = '' )
$used_by string Either user ID or billing email