Add “checkbox” to policy line
-
Friends, hello! Please help me add a checkbox icon. To be the same as in the subject.
I’ve added a snippet. The line has appeared.
But I can’t figure out the CSS. Extra values are added.
Here is my snippet:
add_action( 'woocommerce_review_order_before_submit', 'add_privacy_block', 9 ); function add_privacy_block() { woocommerce_form_field( 'terms', array( 'type' => 'checkbox', 'class' => array('form-row privacy'), 'label_class' => array('woocommerce-form__label woocommerce-form__label-for-checkbox checkbox'), 'input_class' => array('woocommerce-form__input woocommerce-form__input-checkbox'), 'required' => true, 'label' => 'Я прочитал и согласен с <a ><b>политикой конфиденциальности</b></a>', )); } add_action( 'woocommerce_checkout_process', 'privacy_checkbox_error_message' ); function privacy_checkbox_error_message() { if ( ! (int) isset( $_POST['privacy_policy'] ) ) { wc_add_notice( __( 'Вам необходимо отметить галочкой, что вы ознакомлены с политикой конфиденциальности' ), 'error' ); } }
I wrote a link to the site above: https://genreeds.ru/checkout/
Help out plz… ??
The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Add “checkbox” to policy line’ is closed to new replies.