flowdee / edd-software-license-manager

Seamless integration between the WordPress plugins Easy Digital Downloads and Software License Manager.
GNU General Public License v3.0
11 stars 7 forks source link

variable price should have default sites_allowed value #4

Open ecava-dx opened 8 years ago

ecava-dx commented 8 years ago

In edd_slm_get_variable_price_sites_allowed(), function will return false for variable price item if no specific sites limit is entered. So I propose to return at least 1 as the default value rather than failing the key generation.

if ( isset( $prices[ $price_id ][ 'edd_slm_sites_allowed' ] ) ) {
    return absint( $prices[ $price_id ][ 'edd_slm_sites_allowed' ] );
}
else {
    return 1; //default to 1
}
flowdee commented 8 years ago

Thanks for this suggestion @KopeLee. I'll take care of soon