Last active
June 23, 2022 12:06
-
-
Save kimcoleman/f8f3f4b9d493620832a7c320572c8524 to your computer and use it in GitHub Desktop.
Hide the Discount Code field on Easy Digital Downloads checkout.
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 | |
/** | |
* Hide the Discount Code field on Easy Digital Downloads checkout. | |
* Customers can only apply coupons using a URL attribute like: | |
* http://sitewidesales.local/checkout/?discount=loyal. | |
*/ | |
function my_edd_no_discount_code_on_checkout() { | |
remove_action( 'edd_checkout_form_top', 'edd_discount_field', -1 ); | |
} | |
add_action( 'init', 'my_edd_no_discount_code_on_checkout' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment