Skip to content

Commit

Permalink
Sub-routines for gift codes. See: #285, #403, #386
Browse files Browse the repository at this point in the history
  • Loading branch information
jaswsinc committed Jan 24, 2015
1 parent 3323622 commit 4a9ffd6
Show file tree
Hide file tree
Showing 2 changed files with 223 additions and 169 deletions.
12 changes: 9 additions & 3 deletions s2member/includes/classes/installation.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,18 @@ public static function uninstall()
if(is_multisite() && is_main_site() /* Site options? */)
delete_site_option('ws_plugin__s2member_options');

$wpdb->query("DELETE FROM `".$wpdb->options."` WHERE `option_name` LIKE '%".esc_sql(c_ws_plugin__s2member_utils_strings::like_escape('s2member_'))."%'");
$wpdb->query("DELETE FROM `".$wpdb->options."` WHERE `option_name` LIKE '".esc_sql(c_ws_plugin__s2member_utils_strings::like_escape('_transient_s2m_'))."%'");
$wpdb->query("DELETE FROM `".$wpdb->options."` WHERE `option_name` LIKE '".esc_sql(c_ws_plugin__s2member_utils_strings::like_escape('_transient_timeout_s2m_'))."%'");
$wpdb->query("DELETE FROM `".$wpdb->postmeta."` WHERE `meta_key` LIKE '".esc_sql(c_ws_plugin__s2member_utils_strings::like_escape('s2m_'))."%'");
$wpdb->query("DELETE FROM `".$wpdb->postmeta."` WHERE `meta_key` LIKE '%".esc_sql(c_ws_plugin__s2member_utils_strings::like_escape('_s2m_'))."%'");
$wpdb->query("DELETE FROM `".$wpdb->postmeta."` WHERE `meta_key` LIKE '%".esc_sql(c_ws_plugin__s2member_utils_strings::like_escape('s2member_'))."%'");

$wpdb->query("DELETE FROM `".$wpdb->usermeta."` WHERE `meta_key` LIKE '".esc_sql(c_ws_plugin__s2member_utils_strings::like_escape('s2m_'))."%'");
$wpdb->query("DELETE FROM `".$wpdb->usermeta."` WHERE `meta_key` LIKE '%".esc_sql(c_ws_plugin__s2member_utils_strings::like_escape('_s2m_'))."%'");
$wpdb->query("DELETE FROM `".$wpdb->usermeta."` WHERE `meta_key` LIKE '%".esc_sql(c_ws_plugin__s2member_utils_strings::like_escape('s2member_'))."%'");

$wpdb->query("DELETE FROM `".$wpdb->options."` WHERE `option_name` LIKE '".esc_sql(c_ws_plugin__s2member_utils_strings::like_escape('s2m_'))."%'");
$wpdb->query("DELETE FROM `".$wpdb->options."` WHERE `option_name` LIKE '%".esc_sql(c_ws_plugin__s2member_utils_strings::like_escape('_s2m_'))."%'");
$wpdb->query("DELETE FROM `".$wpdb->options."` WHERE `option_name` LIKE '%".esc_sql(c_ws_plugin__s2member_utils_strings::like_escape('s2member_'))."%'");

do_action('ws_plugin__s2member_during_uninstall', get_defined_vars());
}
do_action('ws_plugin__s2member_after_uninstall', get_defined_vars());
Expand Down
Loading

0 comments on commit 4a9ffd6

Please sign in to comment.