Last active
December 5, 2023 17:39
-
-
Save emre-edu-tech/b2203f09191b14ea679eb1491d77be72 to your computer and use it in GitHub Desktop.
Shortcode to check if a plugin is active. In this example, a plugin with the directory name and main plugin file is used.
This file contains 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
<?php | |
add_shortcode('check_if_scraper_plugin_is_active', function() { | |
if(is_plugin_active('product-scraper/product-scraper.php')) { | |
return true; | |
} else { | |
return false; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment