rmdir( $walletpb_cache, true ); } } if ( '1' === get_option( 'walletpb_delete_data', '0' ) ) { global $wpdb; foreach ( array( 'walletpb_template', 'walletpb_template_pass', 'walletpb_delete_data', 'walletpb_db_version', 'walletpb_latepoint', 'walletpb_booking_template', 'walletpb_amelia', 'walletpb_amelia_template', 'walletpb_amelia_cursor', 'walletpb_amelia_event', 'walletpb_amelia_event_template', 'walletpb_amelia_event_cursor', 'walletpb_sugar_calendar', 'walletpb_sugar_calendar_template', 'walletpb_sugar_calendar_cursor', 'walletpb_event_tickets', 'walletpb_event_tickets_template', 'walletpb_event_tickets_cursor', 'walletpb_bookly', 'walletpb_bookly_template', 'walletpb_bookly_seen', 'walletpb_events_manager', 'walletpb_events_manager_template', 'walletpb_events_manager_cursor', 'walletpb_eventon', 'walletpb_eventon_template', 'walletpb_eventon_cursor', 'walletpb_event_espresso', 'walletpb_event_espresso_template', 'walletpb_event_espresso_cursor', 'walletpb_woocommerce', 'walletpb_woocommerce_template', 'walletpb_woocommerce_cursor' ) as $walletpb_option ) { delete_option( $walletpb_option ); } // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.SchemaChange -- removes the plugin's own table on uninstall. $wpdb->query( $wpdb->prepare( 'DROP TABLE IF EXISTS %i', $wpdb->prefix . 'walletpb_activity' ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.SchemaChange -- removes the plugin's own table on uninstall. $wpdb->query( $wpdb->prepare( 'DROP TABLE IF EXISTS %i', $wpdb->prefix . 'walletpb_cards' ) ); }