query( $wpdb->prepare( 'DROP TABLE IF EXISTS %i', $wpdb->prefix . $okelsync_table ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery } foreach ( array( 'okelsync_settings', 'okelsync_shop', 'okelsync_db_version', 'okelsync_image_cache', 'okelsync_last_poll', 'okelsync_last_reconcile' ) as $okelsync_option ) { delete_option( $okelsync_option ); } $okelsync_up = wp_upload_dir(); foreach ( (array) glob( $okelsync_up['basedir'] . '/okel-sync/okelsync-*.jpg' ) as $okelsync_file ) { wp_delete_file( $okelsync_file ); } if ( function_exists( 'as_unschedule_all_actions' ) ) { as_unschedule_all_actions( '', array(), 'okelsync' ); }