• Hi,
    I use this extension but i have an issue on chekout profile register form. I have the message : “Invalid confirmation password” because i didn’t see this field !

    Thanks for your help
    Jerome

Viewing 4 replies - 1 through 4 (of 4 total)
  • The solution suggested by Howdy_McGee at https://www.ads-software.com/support/topic/invalid-confirmation-password/ will be able help you to resolve the issue

    • This reply was modified 4 years, 7 months ago by cheey2003.

    Hello @cheey2003 ,
    unfortunately the solution given by Howdy_McGee at https://www.ads-software.com/support/topic/invalid-confirmation-password/ is not working neither to me.

    I copied-pasted his code, but the problem is still there.
    The problem could be that this function PREVENT this problem to occur again, but once the former data are saved its’ not possible to stripe them away (rather than removing the form and putting a new one), am I right?

    In order to achieve this a function within the hook woocommerce_register_form must be wrote.

    This should something as this, the central code is missing:

    /**
    * Clean up the woocommerce registration form in case it is pre-populated
    * @return void
    **/

    add_action( ‘woocommerce_register_form’, ‘acf_account_fields_clean_data_on_registrationform’);

    function acf_account_fields_clean_data_on_registrationform() {

    //here I need to write the code to clean the population form.
    //I’ve tried with no success, any hint?

    }

    So, the total code should appear as this:

    /***************** 1st part: prevent saving *********************/
    /**
    * Reset the ACF Array before it saves postmeta
    * Priority 5 is Before Save, 10+ After Save
    *
    * @return void
    */
    function acf_account_fields_save_prevention() {

    if( is_admin() || ! isset( $_POST[‘woocommerce-register-nonce’] ) || empty( $_POST[‘acf’] ) ) {
    return;
    }

    $_POST[‘acf’] = array();

    }
    add_action( ‘acf/save_post’, ‘acf_account_fields_save_prevention’, 5 );

    /**************** 2nd part: cleanup the form (for double checking and security ******************/
    /**
    * Clean up the woocommerce registration form in case it is pre-populated
    * @return void
    **/

    add_action( ‘woocommerce_register_form’, ‘acf_account_fields_clean_data_on_registrationform’);

    function acf_account_fields_clean_data_on_registrationform() {

    //here I need to write the code to clean the population form.
    //I’ve tried with no success, any hint?

    }

    so for a complete solution just the php for cleaning the code is missing.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Checkout form’ is closed to new replies.