prefix . $name; // phpcs:ignore WordPress.DB.DirectDatabaseQuery, WordPress.DB.PreparedSQL.InterpolatedNotPrepared $wpdb->query( "DROP TABLE IF EXISTS `{$table}`" ); } $options = array( 'roleWcAdcellTrackingActive', 'roleWcAdcellProgramId', 'roleWcAdcellEventId', 'roleWcAdcellRetargeting', 'roleWcAdcellS2s', 'roleWcAdcellServerCookie', 'roleWcAdcellAmountBasis', 'roleWcAdcellCustomerEvents', 'roleWcAdcellEventIdNewCustomer', 'roleWcAdcellEventIdOldCustomer', 'roleWcAdcellCategoryEvents', 'roleWcAdcellConsentMode', 'roleWcAdcellConsentCookie', 'roleWcAdcellDebug', 'roleWcAdcellDbVersion', ); for ( $slot = 1; $slot <= 10; $slot++ ) { $options[] = "roleWcAdcellCategoryEvent{$slot}EventId"; $options[] = "roleWcAdcellCategoryEvent{$slot}Categories"; } foreach ( $options as $option ) { delete_option( $option ); } delete_transient( 'roleWcAdcellInstallTry' ); wp_clear_scheduled_hook( 'roleWcAdcellProcessQueue' ); wp_clear_scheduled_hook( 'roleWcAdcellPrune' ); } global $wpdb; if ( is_multisite() ) { $blogs = get_sites( array( 'fields' => 'ids', 'number' => 0 ) ); foreach ( $blogs as $blog_id ) { switch_to_blog( (int) $blog_id ); role_wc_adcell_uninstall_site( $wpdb ); restore_current_blog(); } } else { role_wc_adcell_uninstall_site( $wpdb ); }