Add Terms and Conditions checkbox

This commit is contained in:
Caleb Burks 2015-09-07 10:10:28 -05:00
parent 358f3f79fa
commit 84f8d606b3
1 changed files with 8 additions and 0 deletions

View File

@ -91,6 +91,14 @@ if ( ! defined( 'ABSPATH' ) ) {
echo apply_filters( 'woocommerce_pay_order_button_html', '<input type="submit" class="button alt" id="place_order" value="' . esc_attr( $pay_order_button_text ) . '" data-value="' . esc_attr( $pay_order_button_text ) . '" />' );
?>
<?php if ( wc_get_page_id( 'terms' ) > 0 && apply_filters( 'woocommerce_checkout_show_terms', true ) ) : ?>
<p class="form-row terms">
<label for="terms" class="checkbox"><?php printf( __( 'I&rsquo;ve read and accept the <a href="%s" target="_blank">terms &amp; conditions</a>', 'woocommerce' ), esc_url( wc_get_page_permalink( 'terms' ) ) ); ?></label>
<input type="checkbox" class="input-checkbox" name="terms" <?php checked( apply_filters( 'woocommerce_terms_is_checked_default', isset( $_POST['terms'] ) ), true ); ?> id="terms" />
</p>
<?php endif; ?>
<input type="hidden" name="woocommerce_pay" value="1" />
</div>