Monetization WordPress Plugin HTTPS Fix


For anyone that’s used, or is using the Monetization plugin for WordPress, will have noticed that the entry script doesn’t load under websites utilising SSL. This is due to their CDN link inside the plugin using HTTP by default without an option to change over to HTTPS/SSL – Which causes most common browsers to either block (Firefox for example) or warn about insecure links.

Here I’ll present a simple solution to rectify the error until they release an official fix for it.

First thing we need to do – FTP into your web host and navigate to “wp-content/plugins/shortest-website-monetization/views”. Inside this folder there should be 3 files, admin.php, index.php and public.php. We’re interested in the “public.php” which injects the entry script on your website pages.


Open up the “public.php” and it will look like this.

Line 64 is where the problem originates, we want to change the script.src = ‘’; to script.src = ‘’;If we’re running under SSL.

Let’s add a small check inside the code to find out if the current blog we’re running under is using SSL or not – We’ll use WordPress’s inbuilt function “is_ssl()” just for that purpose.

Now we edit the public.php to look like:

Look carefully and you will notice we added:

Hope this helped anyone facing problems with the entry script not loading and have fun getting a bit of extra money from your blog!

P.S.: If you thought this guide was helpful – feel free to sign-up using my link, thanks!


Post updated to use a more generic approach at 15:34:32

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.