If wordpress API gives you http instead of https it means that somewhere your data still contains HTTP, therefor you might need to take a more careful look at what urls are in your DB, for this specific functions you should look at your menus.
But probably the simplest way to solve this issue to to buffer page generation by using ob_start
on init event and outputting the buffer on shutdosn after replacing all the http://mydomain to https://mydomain.
add_action('init','wpse199859_stat_buffering',0);
function wpse199859_stat_buffering() {
ob_start();
}
add_action('shutdown','wpse199859_stop_buffering',0);
function wpse199859_stop_buffering() {
$o = ob_get_contents();
echo str_replace('http://mydomain','https://mydomain',$o);
}
Related Posts:
- Ngrok errors ‘502 bad gateway’
- curl: (60) Peer’s Certificate issuer is not recognized.
- Switch from https back to http
- Stop WordPress from using HTTPS and just use HTTP
- Chrome Version 44.0.2403.89 m is trying to force HTTPS
- Use https for img src
- WordPress in HTTPS, causing Redirect Loops
- Serving HTTP and HTTPS from one installation
- WordPress behind Proxy – Mixed Content
- How to deactivate/remove https on localhost project from online
- Changing http to https in wp_options
- Moving from http to https, and www. to non-www URL
- Redirect URL on OAuth2.0 after switching from http to https
- Modify a plugin to open external links with iframe using https and not http?
- How to fix mixed content warnings for plugin resources?
- Changing HTTP to HTTPS
- WordPress changing script source from https to http
- WordPress forces HTTPS to HTTP in template
- WordPress HTTP requests point to localhost server after move to live HTTPS server
- Internet Explorer “Security Information” on every page in https site
- Category links break the https
- Can’t access Admin Panel
- Issues with forcing HTTPS
- Make WordPress site secure through HTTPS and SSL
- What is the “Force secure connections” option used for?
- White page on requests with Sec-Fetch-Site: cross-site
- Windows-hosted new site shows no preview: “Future home of something quite cool.” message is displayed
- Staging Session Randomly Switched from Secure (https) to Not Secure
- Moving wordpress site from HTTP to HTTPS ERR_TOO_MANY_REDIRECTS
- Issues after switching over to HTTPS
- content block https from http
- Navigation Bar displays vertically on Mozilla
- ERR_TOO_MANY_REDIRECTS when I change http to https
- I just updated to Https from Http, Should I change WordPress Address (URL) and Site Address in WordPress Dashboard?
- i can’t enter to control panel of my WordPress site
- Turn off https in WordPress 4
- Change links beginning from http:// to // so that https site can get correct CSS/JS files
- HTTPS for every page except for feeds
- wordpress website crash on https
- Whole website redirected to httpa but in dashboard settings still http
- http to https stuck in infinite loop
- How to test a HTTPS URL with a given IP address
- nodejs – error self signed certificate in certificate chain
- How to execute a https GET request from java
- Java: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
- ndroid 8: Cleartext HTTP traffic not permitted
- How to find out if you’re using HTTPS without $_SERVER[‘HTTPS’]
- How to force Laravel Project to use HTTPS for all routes?
- How can I fix the “No certificates found – The app Chrome has requested a certificate” Android / Google Chrome issue
- HTTPS leads to Sorry, you are not allowed to access this page
- Stop WordPress and Plugins from Overwriting .htaccess
- Loading different JS for http and https
- Is the WordPress HTTPS Plugin Still Safe To Use? [closed]
- Force home page to be https?
- Redirect www to non-www htaccess
- Admin-Ajax.php, SSL, Non-SSL
- How are both HTTP and HTTPS versions displaying?
- SSL setup: wp-login css doesn’t load over httpS
- get_permalink executes link without https
- How to modify the .htaccess to force ssl on login and admin pages
- Cant Access Website – Changed HTTP to HTTPs
- WordPress Redirecting HTTPS Requests to HTTP
- WordPress generated links – menus and home_url() – not using https despite settings
- Link to Network Admin Broken After Switching to HTTPS
- No ‘Access-Control-Allow-Origin’ header is present [closed]
- WordPress site shows “File not found.” if opened through https
- Redirect HTTP to HTTPS for all sub domains (blog posts)
- Migrating MultiSite to SSL: Media Library not updating
- Address a single page to SSL https secure protocol?
- Web site Header tag links some resources with HTTPS
- How to use https on one page only?
- Locked out of admin and some pictures don’t show after failed SSL installation
- .htaccess 301 redirect conflict with plugin “WordPress Https”
- Need ideas for HTTPS multiple domain solution
- HTTP Error When Uploading Images with HTTPS?
- Edit External CSS
- Force WordPress https redirect before www redirect based on site address url
- WP-admin redirects to login after adding SSL certificate
- How to make my site use HTTPS for images or how to insert images as relative paths?
- Generate HTTPS Urls in multisite
- Need workaround for insecure XMLHttpRequest endpoint request
- Authorize subdomain to access and read user and admin cookies
- Cron and request with wp_remote_post
- After changed url from http to https, it says “This site can’t be reached”
- https rewrite not working for All in one security Brute force > rename login url
- How to convert multisite subdomain from http to https
- Cannot access wp-admin after installing SSL – user capabilities not being set
- bloginfo(); outputs wrong urls without https on inner pages
- Change home_url in searchform.php to go to HTTPS instead of HTTP
- SSL Certificate
- How to send user data from one website to another
- How to switch static files back to using HTTP instead of HTTPS?
- Login problem with https
- HTTPS permalinks resulting in 404
- Mixed content and expired session issues with SSL and wp-admin
- CSS/JS is not working in multi lang installation
- Any idea on how to fix this error when forcing SSL on a certain page?
- Cant enter admin page with SSL
- Mixed content warning on doctype in admin
- Force Jetpack to use og:url with http on an https website