Ecommerce Shopify WordPress Discussion

WordPress Shortcode not Updating Page for Logged Out Users

I have written a very short PHP snippet which works absolutely fine when I am logged in to the site, but which doesn't update the content for logged out users. The code reads simple text files listed on the server and concatenates the strings together. The code is as follows: // function that runs when shortcode is called function php_hybridiser() { $f_contents = file("/home/aegiswebdesign/htdocs/"); $line = $f_contents[array_rand($f_contents)]; $item_1 = $line; $f_contents = file("/home/aegiswebdesign/htdocs/"); $line = $f_contents[array_rand($f_contents)]; $item_2 = $line; $hybridiser = $item_1 . " " . $item_2; return $hybridiser; } // register shortcode add_shortcode('hybridiser', 'php_hybridiser'); I assume this has to do with the permissions of logged out users to access the files on the server, but I'm really not sure how to check what permissions the function has regarding the files, or for that matter why it seems to be caching a version of the function but not refreshing it. Function is here, using Wordpress to generate the site and Code Snippets to create the shortcode. Otherwise I can post details of all the other plugins running if that would be helpful?
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.