• Resolved lowellallen

    (@lowellallen)


    I have a custom validation function hooked to user_profile_update_errors in a front-end form that works fine when action of form uses http protocol but does not work (does not return errors) when action of form uses https protocol. That’s a problem because I’m using in an order flow (user can update information while ordering product) and I need https protocol.

    Has anyone encountered this problem and found a solution?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi there,

    Did you find a solution? Can you post the code?

    Thread Starter lowellallen

    (@lowellallen)

    No, I have not found a solution.

    LowellAllen,

    Have you checked to make sure that the parameters are passing correctly in both http and https?

    My guess is that they are. If that’s true, and the parameters are passing correctly in both conditions, then my assumption is that it has to do with your custom function and not the action hook.

    Try doing something basic with the passed parameters to troubleshoot them. Then, if you need help with your function, I’d suggest posting the code here.

    Thread Starter lowellallen

    (@lowellallen)

    At this point I’m not sure how to verify that parameters are passing correctly in https. One test I’ve done is to add a test error in error checking function so that is_wp_error should return true, but it does not when using https.

    Section of data collection form that links to profile.php:
    http://pastebin.com/HEN0D1Ah

    Error checking function: http://pastebin.com/BWvpGGgu

    Thread Starter lowellallen

    (@lowellallen)

    I have found a solution:

    1) Force admin to use SSL by adding to wp-config.php:
    define('FORCE_SSL_ADMIN', true);

    2) Specify ‘admin’ as second argument of self_admin_url function:
    $processing_script = self_admin_url( 'profile.php', 'admin' );

    Previously I was using ‘https’ or ‘http’ as second argument. I also tried without specifying a second argument, which should be same as specifying the default ‘admin’, but did not have WordPress admin forced to use SSL.

    My tests now work on order flow page using https and on front end profile update page using http.

    Glad you got it working!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘user_profile_update_errors and https’ is closed to new replies.