Try to change /wp-admin/admin-ajax.php into HTTPS but all method failed
-
So my eCommence software return follow error message:
The page at https://creatorup.com/checkout-2/?edd_action=add_to_cart&download_id=596 displayed insecure content from http://creatorup.com/wp-admin/admin-ajax.php.XMLHttpRequest cannot load http://creatorup.com/wp-admin/admin-ajax.php. Origin https://creatorup.com is not allowed by Access-Control-Allow-Origin.
So I need to turn everything inside /wp-admin/ folder, including admin-ajax.php into https. But I tried every way and all fails.
1. I tried put “wp-admin”, “/wp-admin/” in the WP HTTPS backend labeled URL Filters. Not working.
2. I tried this code:[ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]
//WordPress HTTPS function store_force_ssl( $force_ssl, $post_id = 0, $url = '' ) { if ( strpos($url, 'admin') !== false ) { $force_ssl = true; } return $force_ssl; } add_filter('force_ssl', 'store_force_ssl', 10, 3);Not working
3. I tried this code:function store_force_ssl( $force_ssl, $post_id ) { if ( strpos($_SERVER['REQUEST_URI'], 'wp-admin') !== false ) { $force_ssl = true; } return $force_ssl; } add_filter('force_ssl', 'store_force_ssl', 10, 2);Not working.
Please help…
The topic ‘Try to change /wp-admin/admin-ajax.php into HTTPS but all method failed’ is closed to new replies.