Thread Starter
cathag
(@cathag)
here the checkout privacy policy checkbox plugin (I used an interne post to create it so ther’s the name/link of the source) :
<?php
/**
* Plugin Name: checkout privacy policy checkbox
* Description: add a privacy policy checkbox to the woocommerce checkout
* Plugin URI: https://tuttowp.it/gdpr-per-woocommerce/
* Author: Macesanu Madalin Florentin
*/
add_action( 'woocommerce_review_order_before_submit', 'ttwp_add_checkout_privacy_policy', 9 );
function ttwp_add_checkout_privacy_policy() {
woocommerce_form_field( 'privacy_policy', 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 input-checkbox'),
'required' => true,
'label' => 'I tuoi dati personali ci aiuteranno a creare il tuo account, a supportare la tua esperienza utente in questo sito Web, e per altri scopi descritti nella nostra <a href="/privacy-policy">Informativa sulla Privacy</a>. Selezionando la casella, dichiari di aver letto e accettato la nostra informativa sulla privacy.',
));
}
// Mostra avviso se l'utente non accetta.
add_action( 'woocommerce_checkout_process', 'ttwp_not_approved_privacy' );
function ttwp_not_approved_privacy() {
if ( ! (int) isset( $_POST['privacy_policy'] ) ) {
wc_add_notice( __( 'Per favore accetta la nostra informativa sulla privacy.' ), 'error' );
}
}
Hi @cathag,
I could not see the problem on your website.
Could you send a screenshot of the problem?
Best,
Diego
Thread Starter
cathag
(@cathag)
Hi,
here the screenshot:
https://ibb.co/ZKDCJHD
the terms checkbox is the fluid checkout one and it has the same problem.
Catherine
Hi @cathag,
Thanks for sending the screenshot.
This issue only happens on the Firefox browser, that is why I could not see it before.
I made a few style changes to avoid this from happening. This fix will be available with the next version 1.5.4.
I let you know once the new version is available.
Best,
Diego
Thread Starter
cathag
(@cathag)
You’re my hero!
grazie mille di tutto
Catherine
Hi @cathag,
We have just released version 1.5.4 with this fix.
Best,
Diego