Skip to content

Commit

Permalink
Merge pull request #31 from saucal/fix/function-check
Browse files Browse the repository at this point in the history
Add check for new relic fn before using it.
  • Loading branch information
jeffpaul authored Dec 3, 2019
2 parents 6997f53 + 82ba958 commit c51428c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions classes/class-wp-nr-apm.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@ public function sitemap_check( $query ) {
public function set_admin_transaction() {
global $pagenow, $taxnow, $typenow;

// do nothing if function doesn't exist
if ( ! function_exists( 'newrelic_name_transaction' ) ) {
return;
}

$transaction = false;

// determine active action
Expand Down

0 comments on commit c51428c

Please sign in to comment.