-
-
Save rali14/3407a1b3efe149cfa3f17caff8743eda to your computer and use it in GitHub Desktop.
Hide the license key within LearnDash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Temporary function to hide the license key entered for LearnDash LMS | |
* Add the below to your child theme's functions.php file or as a code snippet using a third party plugin such as: https://en-ca.wordpress.org/plugins/code-snippets/ | |
*/ | |
function ld_hide_license_key() { | |
echo '"<script type="text/javascript">jQuery( "#nss_plugin_license_sfwd_lms" ).val( "**********" );</script>"'; | |
} | |
add_action('admin_footer', 'ld_hide_license_key'); | |
Please remember to take a complete backup of your site before making any changes. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just piggybacking off this snippet to include the "Bootcamp" license key input as well.
function ld_hide_license_key() { echo '<script type="text/javascript">jQuery( "input[name=\'nss_plugin_license_sfwd_lms\']" ).val( "**********" );</script>'; } add_action('admin_footer', 'ld_hide_license_key');
Basically just changing the selector to match any input with the name "nss_plugin_license_sfwd_lms" which covers both, and potentially other input fields controlling the same setting value.