PhpDoc fixes in class-wc-coupon

This commit is contained in:
Gregory K 2013-11-25 10:00:54 -05:00
parent ea92c633e7
commit ec5f2c3501
1 changed files with 7 additions and 3 deletions

View File

@ -98,7 +98,6 @@ class WC_Coupon {
*
* @access public
* @param mixed $code code of the coupon to load
* @return void
*/
public function __construct( $code ) {
global $wpdb;
@ -200,7 +199,7 @@ class WC_Coupon {
* Check if a coupon enables free shipping.
*
* @access public
* @return void
* @return bool
*/
public function enable_free_shipping() {
return $this->free_shipping == 'yes' ? true : false;
@ -211,7 +210,7 @@ class WC_Coupon {
* Check if a coupon excludes sale items.
*
* @access public
* @return void
* @return bool
*/
public function exclude_sale_items() {
return $this->exclude_sale_items == 'yes' ? true : false;
@ -424,6 +423,11 @@ class WC_Coupon {
return false;
}
/**
* Check if a coupon is valid
*
* @return bool
*/
public function is_valid_for_cart() {
if ( $this->type != 'fixed_cart' && $this->type != 'percent' )
return false;