Commit b5e4f2dd authored by KR Moorhouse's avatar KR Moorhouse

Removed freemius references from optin and optout behavior.

parent 83cccc68
......@@ -98,17 +98,7 @@ final class NF_Tracking
*/
public function is_opted_in()
{
return (bool) get_option( 'ninja_forms_allow_tracking', $this->is_freemius_opted_in() );
}
private function is_freemius_opted_in()
{
$freemius = get_option( 'fs_accounts' );
if( ! $freemius ) return false;
if( ! isset( $freemius[ 'plugin_data' ] ) ) return false;
if( ! isset( $freemius[ 'plugin_data' ][ 'ninja-forms' ] ) ) return false;
if( ! isset( $freemius[ 'plugin_data' ][ 'ninja-forms' ][ 'activation_timestamp' ] ) ) return false;
return true;
return (bool) get_option( 'ninja_forms_allow_tracking' );
}
/**
......@@ -155,17 +145,7 @@ final class NF_Tracking
*/
public function is_opted_out()
{
return (bool) get_option( 'ninja_forms_do_not_allow_tracking', $this->is_freemius_opted_out() );
}
private function is_freemius_opted_out()
{
$freemius = get_option( 'fs_accounts' );
if( ! $freemius ) return false;
if( ! isset( $freemius[ 'plugin_data' ] ) ) return false;
if( ! isset( $freemius[ 'plugin_data' ][ 'ninja-forms' ] ) ) return false;
if( ! isset( $freemius[ 'plugin_data' ][ 'ninja-forms' ][ 'is_anonymous' ] ) ) return false;
return true;
return (bool) get_option( 'ninja_forms_do_not_allow_tracking' );
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment