Home / Admin / Show Terms By Default
Duplicate Snippet

Embed Snippet on Your Site

Show Terms By Default

Show the terms of agreement open on the checkout page by default

Code Preview
php
<?php
function sumobi_edd_show_terms_agreement() {
	global $edd_options;
	/*print_r($edd_options);*/
	if ( isset( $edd_options['show_agree_to_terms'] ) ) {
?>
		<fieldset id="edd_terms_agreement">
			<div id="edd_terms">
				<?php
					do_action( 'edd_before_terms' );
					echo wpautop( stripslashes( $edd_options['agree_text'] ) );
					do_action( 'edd_after_terms' );
				?>
			</div>
			<div class="edd-terms-agreement">
				<input name="edd_agree_to_terms" class="required" type="checkbox" id="edd_agree_to_terms" value="1" />
				<label for="edd_agree_to_terms"><?php echo isset( $edd_options['agree_label'] ) ? stripslashes( $edd_options['agree_label'] ) : __( 'Agree to Terms?', 'edd' ); ?></label>
			</div>
		</fieldset>
<?php
	}
}
remove_action( 'edd_purchase_form_before_submit', 'edd_terms_agreement' );
add_action( 'edd_purchase_form_before_submit', 'sumobi_edd_show_terms_agreement' );

Comments

Add a Comment