Skip to content

Instantly share code, notes, and snippets.

@pippinsplugins
Last active April 21, 2016 02:54
Show Gist options
  • Select an option

  • Save pippinsplugins/4118759 to your computer and use it in GitHub Desktop.

Select an option

Save pippinsplugins/4118759 to your computer and use it in GitHub Desktop.
Change the license expiration length in EDD Software Licensing
function pw_edd_license_length( $length, $payment_id, $download_id, $license_id ) {
if( $download_id == 14 )
return '+2 year'; // give a 2 year expiration for product ID 14
return '+1 year'; // this is default
}
add_filter( 'edd_sl_license_exp_length', 'pw_edd_license_length', 10, 4 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment