Privacy Policy checkbutton
-
Hello,
I installed the latest version of your plugin and set all.
Now I included in functions.php the snippet below to add a checkbox for Privacy Policy but it not shows. No checkbox and no text. There is still the default info about privacy policy.My theme is BFastMag Pro, I read in this forum another issue similar and marker as solved, but there isn’t HOW it solved.
Thanks.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’),
‘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’ => ‘Ho letto e accetto la Privacy Policy di ProgrammareInsieme’,
));
}
add_action( ‘woocommerce_checkout_process’, ‘privacy_checkbox_error_message’ );
function privacy_checkbox_error_message() {
if ( ! (int) isset( $_POST[‘privacy_policy’] ) ) {
wc_add_notice( __( ‘Accetta la nostra privacy policy per proseguire’ ), ‘error’ );
}
}
- The topic ‘Privacy Policy checkbutton’ is closed to new replies.