Skip to content

Instantly share code, notes, and snippets.

@amdrew
Last active January 4, 2016 04:39
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 amdrew/8570147 to your computer and use it in GitHub Desktop.
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
<?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