Skip to content

Commit

Permalink
better comments
Browse files Browse the repository at this point in the history
  • Loading branch information
smithjw1 committed Dec 10, 2024
1 parent 55024be commit c3a9326
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions telemetry/class-pendo.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ class Pendo {
*/
public function __construct() {
$this->visitor_properties = Pendo\get_base_properties_of_pendo_user();
$this->account_properties = [ 'id' => 'VIP' ];
// TODO: Populate with a new constant to get the Salesforce ID of the customer.
$this->account_properties = [];
}

/**
Expand All @@ -55,18 +56,18 @@ public function include_script(): bool|WP_Error {

private function is_enabled(): bool {
if ( [] === $this->visitor_properties || [] === $this->account_properties ) {
//don't enable if we can't track an actual visitor or account
//Don't enable if we can't track an actual visitor or account.
return false;
}
if ( ( false === WPCOM_IS_VIP_ENV || true === WPCOM_SANDBOXED ) ) {
//limit tracking to production
//Limit tracking to production.
return false;
}
if ( defined( 'VIP_IS_FEDRAMP' ) && true === VIP_DISABLE_PENDO ) {
//don't track in FedRAMP environments
//Don't track in FedRAMP environments.
return false;
}
// Check on a new constant to see if Pendo is disabled by the org.
// TODO: Check on a new constant to see if Pendo is disabled by the org.
return false;
}
private function output_pendo_agent(): void {
Expand Down

0 comments on commit c3a9326

Please sign in to comment.