Created
May 16, 2017 16:03
-
-
Save SeanChDavis/1747b4cdd8ae58550bbaccd1f0c52417 to your computer and use it in GitHub Desktop.
EDD SL disable renewal discount for specific product
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php // DO NOT COPY THIS LINE | |
| /* | |
| * Disables renewal discount for specific product | |
| */ | |
| function pw_edd_disable_product_renewal_discount( $renewal_discount, $license_id ) { | |
| $license = edd_software_licensing()->get_license( $license_id ); | |
| // replace 40 with relevant ID | |
| if( 40 == $license->download_id ) { | |
| $renewal_discount = 0; | |
| } | |
| return $renewal_discount; | |
| } | |
| add_filter( 'edd_sl_renewal_discount_percentage', 'pw_edd_disable_product_renewal_discount', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment