Ajax URL may use wrong scheme
-
Ajax URL may use wrong scheme if the constant FORCE_SSL_ADMIN is set to true, but the post is viewed without SSL. In this case session data is lost during ajax processing.
The second parameter of admin_url function is ‘admin’ by default, so you have to set it explicitly like that:
admin_url('admin-ajax.php', is_ssl()?'https':'http');
This is the workaround I use on my site.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Ajax URL may use wrong scheme’ is closed to new replies.