Home Forums WoodMart support forum Obtaining approval for the privacy agreement during the membership registration

Obtaining approval for the privacy agreement during the membership registration

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #597219

    Ecommerce
    Participant

    Hello,
    Customers must read and approve the membership agreement and privacy page when signing up. Isn’t this feature available in the Woodmart theme? How can we solve this without installing a plugin? When I asked Chat gpt, he said that we can solve the problem by adding the following code line to function.php. We kindly request your support on the relevant issue. This requested feature is mandatory all over the world for the privacy of membership records, we kindly ask you to consider it in the next development. I am sending a screenshot in the request attachment so that what I want can be understood.

    Chat GPT’s Recommendation:

    add_action(‘woocommerce_register_form’, ‘add_custom_terms_checkbox’);
    function add_custom_terms_checkbox() {
    ?>
    <p class=”form-row terms”>
    <input type=”checkbox” class=”input-checkbox” name=”terms” id=”terms” />
    <label for=”terms” class=”checkbox”><?php _e(‘I have read and agree to the terms and conditions‘, ‘woocommerce’); ?></label>
    </p>
    <?php
    }

    add_action(‘woocommerce_registration_errors’, ‘check_custom_terms_checkbox’, 10, 3);
    function check_custom_terms_checkbox($errors, $username, $email) {
    if ( ! isset($_POST[‘terms’]) ) {
    $errors->add(‘terms_error’, __(‘You must agree to the terms and conditions.’, ‘woocommerce’));
    }
    return $errors;
    }

    Attachments:
    You must be logged in to view attached files.
    #597453

    Hung Pham
    Keymaster

    Hi Ecommerce,

    Thanks for reaching to us.

    Login and Registration are default WooCommerce functionalities and WoodMart does not control it. For specialized assistance and potential solutions, I kindly suggest that you reach out directly to the author plugin’s support team https://wordpress.org/support/plugin/tabby-checkout/, who are better equipped to provide you with the guidance you requires or You need to find a third party plugin to achieve more functionality that best suits you.

    Regards,

Viewing 2 posts - 1 through 2 (of 2 total)