adding woocommerce_terms_is_checked filter
This commit is contained in:
parent
00ff09e3a2
commit
453dc5a645
|
@ -170,10 +170,12 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|||
echo apply_filters('woocommerce_order_button_html', '<input type="submit" class="button alt" name="woocommerce_checkout_place_order" id="place_order" value="' . esc_attr( $order_button_text ) . '" />' );
|
||||
?>
|
||||
|
||||
<?php if ( wc_get_page_id( 'terms' ) > 0 && apply_filters( 'woocommerce_checkout_show_terms', true ) ) { ?>
|
||||
<?php if ( wc_get_page_id( 'terms' ) > 0 && apply_filters( 'woocommerce_checkout_show_terms', true ) ) {
|
||||
$terms_is_checked = apply_filters( 'woocommerce_terms_is_checked', isset( $_POST['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(wc_get_page_id('terms')) ); ?>" target="_blank"><?php _e( 'terms & 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( $terms_is_checked, true ); ?> id="terms" />
|
||||
</p>
|
||||
<?php } ?>
|
||||
|
||||
|
|
Loading…
Reference in New Issue