As you are surely aware, all network sites with the same active theme all utilize the same source code files. So if you’ve changed the enqueued version in functions.php, we should see all sites use this updated version. The only reason for an older version to appear would have to be caching since the older version no longer physically exists anywhere.
I know you said you refreshed caches. Are you sure you refreshed all involved? Do you use a reverse proxy service like Cloudflare or similar? There could be active caching there which is often overlooked.
it seems site with the updated files is using the old file versions.
I don’t see how that’s possible since there is physically no longer an old file version anywhere (unless cached). If you are seeing old behavior despite using an updated file, I would suspect there’s a flaw in your updated code that’s preventing it from working as expected.
In DevTools, check the network tab to confirm the latest versions are being requested. Click on the updated file’s entry and choose the Response view. You should see your updated code here. If it’s there but you don’t see the expected behavior, I suspect your code is flawed. Are there any JS errors listed in the console? Fatal errors in unrelated code can still prevent yours from functioning correctly.
I managed to work out what was going on. I feel like a bit of an idiot haha. So basically, before I realised you could enqueue scripts as part of the child theme, I had loaded the javascript files via the footer. So it was loading the newer file then loading the older (I guess cached) file, so the old function was being used. Thanks for the help, looking in the dev tools helped me work out what was actually being loaded and when.
Heh, I’ve made the same kind blunder multiple times! Fortunately it’s usually with PHP where we get an error when we try to override functions like that. JS happily uses the unintended code without complaint.