I tried use “Run everywhere” but not work.
The code only work when customer send form.
Now you see that the screen appear empty when login with the test user.
But the cookie isn’t storage and the header redirection don’t work.
I put a some var_dump() to see that the code enter into conditional and show when execute each function.
-
This reply was modified 5 years, 9 months ago by
cristoto.
-
This reply was modified 5 years, 9 months ago by
cristoto.
You need to make sure that all PHP code is executed in the snippet Everywhere. And you can output the form using a shortcode.
Also, don’t forget to abort the script exit(); after calling header()
I did it. I have the same problem with an authorizate user in wordpress work but with I unauthorizate user don’t.
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/themes/Avada/header.php:14)
I see this message on your site. So the theme outputs something earlier. Try executing the code using a hook:
add_action('init', function(){
//your php code
})
http://collabedit.com/44wfv
-
This reply was modified 5 years, 9 months ago by
Temyk.
I tried but not work.
I think the warning isn’t the problem because with an authorize user (login into wordpress) the same code work. If I login with authroize login warning disappear.