Skip to content

Commit

Permalink
Merge pull request #24 from angelleye/AEU-120
Browse files Browse the repository at this point in the history
User cannot dismiss Ratenzahlung expiration notice, AEU-120
  • Loading branch information
kcppdevelopers authored Nov 19, 2020
2 parents fe1b91d + a208057 commit 0149f70
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions admin/class-angelleye-updater-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ public function __construct($file) {
* @return void
*/
public function maybe_process_dismiss_link() {
if (isset($_GET['action']) && ( 'angelleye-helper-dismiss' == $_GET['action'] ) && isset($_GET['nonce']) && check_admin_referer('angelleye-helper-dismiss', 'nonce')) {
if (isset($_GET['action']) && ( 'angelleye-helper-dismiss' == $_GET['action'] ) && isset($_GET['nonce'])) {
update_site_option('angelleye_helper_dismiss_activation_notice', true);
$redirect_url = remove_query_arg('action', remove_query_arg('nonce', $_SERVER['REQUEST_URI']));
wp_safe_redirect($redirect_url);
exit;
}
if (isset($_GET['action']) && ( 'angelleye-helper-expired-notice-dismiss' == $_GET['action'] ) && isset($_GET['nonce']) && check_admin_referer('angelleye-helper-expired-notice-dismiss', 'nonce')) {
if (isset($_GET['action']) && ( 'angelleye-helper-expired-notice-dismiss' == $_GET['action'] ) && isset($_GET['nonce'])) {
$angelleye_helper_dismiss_activation_notice = get_site_option('angelleye_helper_dismiss_activation_notice', false);
if( $angelleye_helper_dismiss_activation_notice == false ) {
update_site_option('angelleye_helper_dismiss_activation_notice', array('0' => $_GET['product']));
Expand Down Expand Up @@ -581,12 +581,14 @@ public function admin_notices() {
*/
protected function get_activated_products() {
$response = array();

$response = get_option($this->token . '-activated', array());

if (!is_array($response))
$exclude_key = 'woo-paypal-ratenzahlung/woo-paypal-ratenzahlung.php';
if(isset($response) && isset($response[$exclude_key])) {
unset($response[$exclude_key]);
}
if (!is_array($response)) {
$response = array();

}
return $response;
}

Expand Down

0 comments on commit 0149f70

Please sign in to comment.