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
파일 보기 프로젝트 열기: woocommerce/woocommerce 1 사용 예제들

공개 메소드들

메소드 설명
__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