Support » Plugin: Login/Signup Popup ( Inline Form + Woocommerce ) » Custom action with $_POST on register

  • Resolved nartoof

    (@nartoof)


    Hi,

    Firstable, thank you very much for your plugin, I really enjoy using it.

    I need to add a custom action when user register and to do this I need to check $_POST data sent.

    I took a look at your source code and didn’t see any way to get the $_POST data when the form is submit, everything is made with AJAX and there is no hook I can use…

    Do you have any solution if, for example, I want to check when the form is submit if $_POST[‘xoo_el_reg_email’] equal to a specific value ?

    Thank you very much for your help.

    Anthony

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author xootix

    (@xootix)

    Hi @nartoof

    Plugin has all the hooks you need.
    If something is ajax based doesn’t mean it will be without hooks.
    Below is the code for doing validation on registration.

    //Validate confirm email address field
    function xoo_cu_el_validate_registration_fields( $validation_error, $username, $password, $email ){
    if( $_POST['xoo_el_reg_email'] !== "your_email_value" ){
    	$validation_error->add( 'email-match-error', "Emails don't match"  );
    }
    return $validation_error;
    }
    add_filter( 'xoo_el_process_registration_errors', 'xoo_cu_el_validate_registration_fields', 10, 4 );
    Thread Starter nartoof

    (@nartoof)

    Hi @xootix,

    I’m really sorry I forgot to answer to that post.

    I knew you can use some hooks on an ajax based feature, but I wasn’t able to find if there is any on your plugin.

    But there is 🙂

    Your answer helped a lot, thank you !

    Have a nice day !

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.