Checkbox “Subscribe to our newsletter” in the registration form
-
Referring to this ticket here
Is this already implemented with your plugin to make a checkbox?
Or do we have to do something like this?
// Add term and conditions check box on registration form add_action( 'woocommerce_register_form', 'add_terms_and_conditions_to_registration', 20 ); function add_terms_and_conditions_to_registration() { ?> <div class="wc-terms-and-conditions"> <p> <label class="woocommerce-form__label woocommerce-form__label-for-checkbox checkbox"> <input type="checkbox" class="woocommerce-form__input woocommerce-form__input-checkbox input-checkbox" style="margin-left: 0; top: 6px;" name="newsletter" <?php checked( apply_filters( 'woocommerce_terms_is_checked_default', isset( $_POST['newsletter'] ) ), true ); ?> id="newsletter" /> <span style="margin-left: 20px;"> <?php printf( __( 'I’ve read and accept the <a href="%s" target="_blank" class="woocommerce-terms-and-conditions-link">Add Me to Newsletter</a>', 'woocommerce' ), esc_url( wc_get_page_permalink( 'your link for Agree to newsletter' ) ) ); ?> </span> <span class="required">*</span> </label> <input type="hidden" name="newsletter-field" value="1" /> </p> </div> <?php }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Checkbox “Subscribe to our newsletter” in the registration form’ is closed to new replies.