Skip to content

Commit

Permalink
Fix table
Browse files Browse the repository at this point in the history
  • Loading branch information
Beee4life committed Oct 25, 2024
1 parent 6148dc9 commit d5ed3da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/form-handling.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ function acfcs_truncate_table() {
ACF_City_Selector::acfcs_errors()->add( 'error_no_nonce_match', esc_html__( 'Something went wrong, please try again.', 'acf-city-selector' ) );
} else {
global $wpdb;
$prefix = $wpdb->get_blog_prefix();
$wpdb->query( $wpdb->prepare( 'TRUNCATE TABLE %scities', $wpdb->get_blog_prefix() ) );
$table = $wpdb->prefix . 'cities';
$wpdb->query( "TRUNCATE TABLE $table" );
ACF_City_Selector::acfcs_errors()->add( 'success_table_truncated', esc_html__( 'All cities are deleted.', 'acf-city-selector' ) );
do_action( 'acfcs_after_success_nuke' );
}
Expand Down

0 comments on commit d5ed3da

Please sign in to comment.