Skip to content

Instantly share code, notes, and snippets.

@kimcoleman
Last active June 23, 2022 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kimcoleman/f8f3f4b9d493620832a7c320572c8524 to your computer and use it in GitHub Desktop.
Save kimcoleman/f8f3f4b9d493620832a7c320572c8524 to your computer and use it in GitHub Desktop.
Hide the Discount Code field on Easy Digital Downloads checkout.
<?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