Added filter to explicitly hide terms agreement checkbox. Closes #3088

This commit is contained in:
Coen Jacobs 2013-05-13 13:41:52 +02:00
parent ecb5edc9bd
commit bb68ce7fd2
2 changed files with 7 additions and 6 deletions

View File

@ -172,6 +172,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
* Tweak - Added filter to check the 'Create account' checkbox on checkout by default * Tweak - Added filter to check the 'Create account' checkbox on checkout by default
* Tweak - Update CPT parameters for 'product_variation' and 'shop_coupon' to be no longer public * Tweak - Update CPT parameters for 'product_variation' and 'shop_coupon' to be no longer public
* Tweak - COD processing instead of on-hold * Tweak - COD processing instead of on-hold
* Tweak - Added filter to explicitly hide terms agreement checkbox
* Fix - Cast term_id as int in product data write panel that will resolve issues with numerical attributes * Fix - Cast term_id as int in product data write panel that will resolve issues with numerical attributes
* Fix - Correct label for RUB symbol - added a dot after it * Fix - Correct label for RUB symbol - added a dot after it
* Fix - Javascript escapes to stop breaking scripts when used with translations * Fix - Javascript escapes to stop breaking scripts when used with translations

View File

@ -194,12 +194,12 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods();
echo apply_filters('woocommerce_order_button_html', '<input type="submit" class="button alt" name="woocommerce_checkout_place_order" id="place_order" value="' . $order_button_text . '" />' ); echo apply_filters('woocommerce_order_button_html', '<input type="submit" class="button alt" name="woocommerce_checkout_place_order" id="place_order" value="' . $order_button_text . '" />' );
?> ?>
<?php if (woocommerce_get_page_id('terms')>0) : ?> <?php if ( woocommerce_get_page_id( 'terms' ) > 0 && apply_filters( 'woocommerce_checkout_show_terms', true ) ) { ?>
<p class="form-row terms"> <p class="form-row terms">
<label for="terms" class="checkbox"><?php _e( 'I have read and accept the', 'woocommerce' ); ?> <a href="<?php echo esc_url( get_permalink(woocommerce_get_page_id('terms')) ); ?>" target="_blank"><?php _e( 'terms &amp; conditions', 'woocommerce' ); ?></a></label> <label for="terms" class="checkbox"><?php _e( 'I have read and accept the', 'woocommerce' ); ?> <a href="<?php echo esc_url( get_permalink(woocommerce_get_page_id('terms')) ); ?>" target="_blank"><?php _e( 'terms &amp; conditions', 'woocommerce' ); ?></a></label>
<input type="checkbox" class="input-checkbox" name="terms" <?php checked( isset( $_POST['terms'] ), true ); ?> id="terms" /> <input type="checkbox" class="input-checkbox" name="terms" <?php checked( isset( $_POST['terms'] ), true ); ?> id="terms" />
</p> </p>
<?php endif; ?> <?php } ?>
<?php do_action( 'woocommerce_review_order_after_submit' ); ?> <?php do_action( 'woocommerce_review_order_after_submit' ); ?>