bugsnag / bugsnag-wordpress

BugSnag error monitoring for WordPress sites
http://wordpress.org/plugins/bugsnag/
GNU General Public License v2.0
20 stars 15 forks source link

Added ability to define API Key as Constant #20

Closed chrisatomix closed 5 years ago

chrisatomix commented 7 years ago

Resolves https://github.com/bugsnag/bugsnag-wordpress/issues/18

Example usage (in wp-config.php)

if(WP_ENV !== 'development') {
  // Only log Bugsnag errors on Staging/Production
  define('BUGSNAG_API_KEY', '(OUR_API_KEY)');
}
fiskhandlarn commented 5 years ago

This would be extremely helpful!

fiskhandlarn commented 5 years ago

Support for env() (https://github.com/vlucas/phpdotenv) would be even better!

tomlongridge commented 5 years ago

Thanks @chrisatomix - I've cherry-picked your commit into #40