• Hello!
    I have a problem aligning a checkbox and the text to it. I think that the problem might go away if the input of the text is being moved outside of the label of the checkbox, but I don’t know how to fix that..
    The code I used for creating the checkbox is (it’s in my functions file):

    
    add_action( 'woocommerce_review_order_before_submit', 'add_privacy_checkbox', 9 );
    function add_privacy_checkbox() {
    woocommerce_form_field( 'privacy_policy', array(
    	'type' => 'checkbox',
    	'class' => array('form-row privacy'),
    	'input_class' => array('woocommerce-form__input woocommerce-form__input-checkbox input-checkbox'),
    	'label_class' => array('woocommerce-form__label woocommerce-form__label-for-checkbox checkbox'),
    	'label' => 'random text.</a>',	
    	'required' => true,
    
    ));
    }
    add_action( 'woocommerce_checkout_process', 'privacy_checkbox_error_message' );
    function privacy_checkbox_error_message() {
    if ( ! (int) isset( $_POST['privacy_policy'] ) ) {
    wc_add_notice( __( 'random text' ), 'error' );
    }
    }
    

    Thank you in advance!
    Regards,
    Alex

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Privacy policy checbox align’ is closed to new replies.