Skip to content

Commit

Permalink
Use $wpdb->prefix for table names in uninstall (#375).
Browse files Browse the repository at this point in the history
  • Loading branch information
rvdsteege committed Apr 3, 2024
1 parent 35b9fc9 commit 51048f3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions uninstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
$wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}rg_ideal_feeds" );

// Delete posts.
$wpdb->query( "DELETE FROM wp_posts WHERE post_type = 'pronamic_gateway';" );
$wpdb->query( "DELETE FROM wp_posts WHERE post_type = 'pronamic_payment';" );
$wpdb->query( "DELETE FROM wp_posts WHERE post_type = 'pronamic_pay_gf';" );
$wpdb->query( "DELETE FROM {$wpdb->prefix}posts WHERE post_type = 'pronamic_gateway';" );
$wpdb->query( "DELETE FROM {$wpdb->prefix}posts WHERE post_type = 'pronamic_payment';" );
$wpdb->query( "DELETE FROM {$wpdb->prefix}posts WHERE post_type = 'pronamic_pay_gf';" );

$wpdb->query( 'DELETE FROM wp_postmeta WHERE post_id NOT IN ( SELECT ID FROM wp_posts );' );
$wpdb->query( "DELETE FROM {$wpdb->prefix}postmeta WHERE post_id NOT IN ( SELECT ID FROM {$wpdb->prefix}posts );" );

// Delete general options.
delete_option( 'pronamic_pay_version' );
Expand Down

0 comments on commit 51048f3

Please sign in to comment.