foreach ((array) $wpm_levels as $sku => $level) {
         $n = 'auto_istag_cancelled_rem' . $sku;
         if (isset($_POST[$n])) {
             $tagsSelections[$sku] = $_POST[$n];
         }
     }
     $istags = maybe_serialize($tagsSelections);
     $this->SaveOption('auto_istags_cancelled_rem', $istags);
 }
 $isapikey = $data[$__index__]['iskey'];
 $ismachine = $data[$__index__]['ismname'];
 $isTagsCategory = array();
 $isTags = array();
 if (class_exists('WLM_AUTORESPONDER_INFUSIONSOFT_INIT')) {
     if ($isapikey && $ismachine) {
         $WLM_AUTORESPONDER_INFUSIONSOFT_INIT = new WLM_AUTORESPONDER_INFUSIONSOFT_INIT();
         $isTagsCategory = $WLM_AUTORESPONDER_INFUSIONSOFT_INIT->getTagsCategory($this, $ismachine, $isapikey);
         $isTags = $WLM_AUTORESPONDER_INFUSIONSOFT_INIT->getTags($this, $ismachine, $isapikey);
         $isTagsCategory[0] = "- No Category -";
         asort($isTagsCategory);
     }
     $this->SaveOption('auto_isapikey', $isapikey);
     $this->SaveOption('auto_ismachine', $ismachine);
 }
 $tag_placeholder = count($isTags) > 0 ? "Select tags..." : "No tags available";
 $auto_istags_add_app = $this->GetOption('auto_istags_add_app');
 if ($auto_istags_add_app) {
     $auto_istags_add_app = maybe_unserialize($auto_istags_add_app);
 } else {
     $auto_istags_add_app = array();
 }
                    } elseif ($data['action'] == 'remove') {
                        $res = $this->RemoveUserTagsHook($data['uid'], $data['removedlevels']);
                    } elseif ($data['action'] == 'cancel') {
                        $res = $this->CancelUserTagsHook($data['uid'], $data['cancellevels']);
                    }
                    if (isset($res['errstr'])) {
                        $res['error'] = strip_tags($res['errstr']);
                        $res['error'] = str_replace(array("\n", "\t", "\r"), '', $res['error']);
                        $d = array('notes' => "{$res['errno']}:{$res['error']}", 'tries' => $queue->tries + 1);
                        $WishlistAPIQueueInstance->update_queue($queue->ID, $d);
                        $error = true;
                    } else {
                        $WishlistAPIQueueInstance->delete_queue($queue->ID);
                        $error = false;
                    }
                }
                //save the last processing time
                if ($error) {
                    $current_time = time();
                    if ($last_process) {
                        update_option("WLM_InfusionsoftARAPI_LastProcess", $current_time);
                    } else {
                        add_option("WLM_InfusionsoftARAPI_LastProcess", $current_time);
                    }
                }
            }
        }
    }
}
$ar = new WLM_AUTORESPONDER_INFUSIONSOFT_INIT();
$ar->load_hooks();