Skip to content

Commit

Permalink
Merge pull request #1306 from angelleye/PFW-398
Browse files Browse the repository at this point in the history
Remove opt-in requirement from activation/deactivation logs, PFW-398
  • Loading branch information
Drew Angell committed Apr 12, 2019
2 parents c27eb24 + 36cb433 commit a5b2b50
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions paypal-for-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -410,30 +410,27 @@ function activate_paypal_for_woocommerce() {
deactivate_plugins(plugin_basename(__FILE__));
}
delete_option('angelleye_paypal_woocommerce_submited_feedback');
$opt_in_log = get_option('angelleye_send_opt_in_logging_details', 'no');
if($opt_in_log == 'yes') {
$log_url = $_SERVER['HTTP_HOST'];
$log_plugin_id = 1;
$log_activation_status = 1;
wp_remote_request('http://www.angelleye.com/web-services/wordpress/update-plugin-status.php?url='.$log_url.'&plugin_id='.$log_plugin_id.'&activation_status='.$log_activation_status);
}
$log_url = $_SERVER['HTTP_HOST'];
$log_plugin_id = 1;
$log_activation_status = 1;
wp_remote_request('http://www.angelleye.com/web-services/wordpress/update-plugin-status.php?url='.$log_url.'&plugin_id='.$log_plugin_id.'&activation_status='.$log_activation_status);
}

/**
* Run when plugin is deactivated.
*/
function deactivate_paypal_for_woocommerce() {
// Log activation in Angell EYE database via web service.
$opt_in_log = get_option('angelleye_send_opt_in_logging_details', 'no');

$is_submited_feedback = get_option('angelleye_paypal_woocommerce_submited_feedback', 'no');
if($opt_in_log == 'yes') {
if($is_submited_feedback == 'no') {
$log_url = $_SERVER['HTTP_HOST'];
$log_plugin_id = 1;
$log_activation_status = 0;
wp_remote_request('http://www.angelleye.com/web-services/wordpress/update-plugin-status.php?url='.$log_url.'&plugin_id='.$log_plugin_id.'&activation_status='.$log_activation_status);
}
}

if($is_submited_feedback == 'no') {
$log_url = $_SERVER['HTTP_HOST'];
$log_plugin_id = 1;
$log_activation_status = 0;
wp_remote_request('http://www.angelleye.com/web-services/wordpress/update-plugin-status.php?url='.$log_url.'&plugin_id='.$log_plugin_id.'&activation_status='.$log_activation_status);
}

}

/**
Expand Down

0 comments on commit a5b2b50

Please sign in to comment.