Skip to content

Instantly share code, notes, and snippets.

@strangerstudios
Created July 13, 2017 20:53
Show Gist options
  • Save strangerstudios/8615586e5936f52bf56b62c18674b51f to your computer and use it in GitHub Desktop.
Save strangerstudios/8615586e5936f52bf56b62c18674b51f to your computer and use it in GitHub Desktop.
Add Custom SSL Seal to PMPro Checkout Page, Including SCRIPT Tags
/*
Add SSL Seal to PMPro Checkout Page
Add this code to a custom plugin or your active theme's functions.php.
Custom code is necessary for this now that PMPro 1.9.3 for security reasons
doesn't allow script tags in the SSL Seal setting text area.
The example below is for an AlphaSSL certificate. Replace the $seal string below with
your own seals code. Be careful if the seal has single quotes in it.
Below we also append (. $seal) the original $seal code as set on the advanced settings page,
where on our own site we add some extra info to this area.
*/
function my_option_pmpro_sslseal($seal) {
if(!is_admin()) {
$seal = '<span id="ss_img_wrapper_115-55_image_en"><a href="http://www.alphassl.com/ssl-certificates/wildcard-ssl.html" target="_blank" title="SSL Certificates"><img alt="Wildcard SSL Certificates" border=0 id="ss_img" src="//seal.alphassl.com/SiteSeal/images/alpha_noscript_115-55_en.gif" title="SSL Certificate"></a></span><script type="text/javascript" src="//seal.alphassl.com/SiteSeal/alpha_image_115-55_en.js"></script>' . $seal;
}
return $seal;
}
add_filter('option_pmpro_sslseal', 'my_option_pmpro_sslseal');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment