limit_usage_to_x_items should be integer

This commit is contained in:
Claudio Sanches 2017-03-06 18:14:15 -03:00
parent 2a639fd459
commit de77bddcfb
1 changed files with 1 additions and 1 deletions

View File

@ -561,7 +561,7 @@ class WC_Coupon extends WC_Legacy_Coupon {
* @throws WC_Data_Exception
*/
public function set_limit_usage_to_x_items( $limit_usage_to_x_items ) {
$this->set_prop( 'limit_usage_to_x_items', $limit_usage_to_x_items );
$this->set_prop( 'limit_usage_to_x_items', absint( $limit_usage_to_x_items ) );
}
/**