Reputation: 165
[![enter image description here][1]][1]
I've tried to use some css
which didn't work this is the php
file. Right now the checkbox covers the first 2 letters of the sentence which displays as: e read and accept the terms & conditions * when trying to make a payment at the checkout page. Please help me with the Custom css
at Dashboard > Appearance > Customize > Additional CSS
in WP
<?php
if ( $terms_content ) {
do_action( 'woocommerce_checkout_before_terms_and_conditions' );
echo '<div class="woocommerce-terms-and-conditions" style="display: none; max-height: 200px; overflow: auto;">' . $terms_content . '</div>';
}
?>
<p class="form-row terms wc-terms-and-conditions">
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox checkbox">
<input type="checkbox" class="woocommerce-form__input woocommerce-form__input-checkbox input-checkbox" name="terms" <?php checked( apply_filters( 'woocommerce_terms_is_checked_default', isset( $_POST\['terms'\] ) ), true ); ?> id="terms" /> <span><?php printf( __( 'I’ve read and accept the <a href="%s" class="woocommerce-terms-and-conditions-link">terms & conditions</a>', 'woocommerce' ), esc_url( wc_get_page_permalink( 'terms' ) ) ); ?></span> <span class="required">*</span>
</label>
<input type="hidden" name="terms-field" value="1" />
</p>
<?php do_action( 'woocommerce_checkout_after_terms_and_conditions' ); ?>
Upvotes: 0
Views: 1006
Reputation: 3663
Please try the following code, it may solve your problem.
<?php printf( __( ' I’ve read and accept the <a href="%s" class="woocommerce-terms-and-conditions-link">terms & conditions</a>', 'woocommerce' ), esc_url( wc_get_page_permalink( 'terms' ) ) ); ?>
Here I use
for single space to shift the text to right.
Upvotes: 1