monsterinsights_get_shareasale_id

The Google Analytics for WordPress by MonsterInsights monsterinsights get shareasale id function.

Description

monsterinsights_get_shareasale_id(); 

Usage

  1. if ( !function_exists( 'monsterinsights_get_shareasale_id' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-analytics-for-wordpress-by-monsterinsights/includes/admin/common.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = monsterinsights_get_shareasale_id(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/admin/common.php  
  1. function monsterinsights_get_shareasale_id() { 
  2. // Check if there's a constant. 
  3. $shareasale_id = ''; 
  4. if ( defined( 'MONSTERINSIGHTS_SHAREASALE_ID' ) ) { 
  5. $shareasale_id = MONSTERINSIGHTS_SHAREASALE_ID; 
  6.  
  7. // If there's no constant, check if there's an option. 
  8. if ( empty( $shareasale_id ) ) { 
  9. $shareasale_id = get_option( 'monsterinsights_shareasale_id', '' ); 
  10.  
  11. // Whether we have an ID or not, filter the ID. 
  12. $shareasale_id = apply_filters( 'monsterinsights_shareasale_id', $shareasale_id ); 
  13. return $shareasale_id;