Skip to content

Commit

Permalink
Merge pull request #117 from a8cteam51/add/newsletter-subscribers
Browse files Browse the repository at this point in the history
Scrubs subscribers for the Newsletter plugin
  • Loading branch information
GeoJunkie authored Feb 8, 2024
2 parents aab59aa + 71fb3ff commit b4dccc3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions includes/delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ function delete_users_and_orders() {
$wpdb->query( "DELETE FROM {$wpdb->prefix}wpml_mails" );
}

// Delete Newsletter plugin subscribers
$table_name = $wpdb->prefix . 'newsletter';
if ( $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $table_name ) ) === $table_name ) {
$wpdb->query( "DELETE FROM {$wpdb->prefix}newsletter" );
}



// Reassigning all posts to the first admin user
reassign_all_posts();

Expand Down

0 comments on commit b4dccc3

Please sign in to comment.