Last active
January 4, 2016 04:39
-
-
Save amdrew/8570147 to your computer and use it in GitHub Desktop.
Use custom page for "agree to terms" in Easy Digital Downloads. Simply change the $page_id to the page ID you'd like to link to
This file contains 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 | |
function sumobi_edd_terms_agreement() { | |
global $edd_options; | |
if ( isset( $edd_options['show_agree_to_terms'] ) ) : ?> | |
<fieldset id="edd_terms_agreement"> | |
<label for="edd_agree_to_terms"> | |
<?php | |
$page_id = 32; // change this to the ID of your terms page | |
echo '<a target="_blank" href="' . get_permalink( $page_id ) . '">Agree to terms?</a>'; | |
?> | |
</label> | |
<input name="edd_agree_to_terms" class="required" type="checkbox" id="edd_agree_to_terms" value="1" /> | |
</fieldset> | |
<?php endif; | |
} | |
remove_action( 'edd_purchase_form_before_submit', 'edd_terms_agreement' ); | |
add_action( 'edd_purchase_form_before_submit', 'sumobi_edd_terms_agreement' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment