Woocommerce Cart page caching users addresses
-
Hi,
I’m having an issue with a site on Site Tools running the SG Optimiser plugin. It is caching user addresses on the Woocommerce Checkout page.
I know the plugin states that it should cache these Woocommerce by default. I also know you can add pages URL’s to exclude in the dashboard.
The issue is that I use a slightly different directory for installations. My ‘wp-content’ directory is in the root, but renamed to ‘app’. All my other core wordpress files (excluding the index.php, and wp-config which are also in the root) are in their own directory named ‘wp’. In short my directory/file structure looks like the following…
/app
/index.php (modified to include wp in the path to load wp-blog-header.php)
/wp
/wp-config.phpIn the config file I usually define my site url, content url, content directory, and home URL buy the following…
define('WP_SITEURL', 'https://' . $_SERVER['SERVER_NAME'] . '/wp'); define('WP_HOME', 'https://' . $_SERVER['SERVER_NAME'] ); define('WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/app'); define('WP_CONTENT_URL', 'https://' . $_SERVER['SERVER_NAME'] . '/app');
With Site tools I have to replace $_SERVER[‘DOCUMENT_ROOT’] with the path ‘/home/customer/www/mywebsite.com/public_html’ to get it working.
As a result of this setup, when I try to exclude a URL in the dashboard it add it as… mywebsite.com/wp/checkout, when in fact it is mywebsite.com/checkout
I know there are filters for excluding files from minification, but I can find any documentation for a filter to exclude URL’s from caching, so that I can add the required urls without ‘/wp’ in the path.
I have contacted Siteground support for some issues I was experiencing before with the SG Optimizer plugin, but was told the plugin can’t support my file structure, and I should revert to the default.
I don’t want to do this for multiple reasons, but I would also like to keep using the SG Optimizer, as I’m on Siteground hosting and would like to avail of their services.
Surely there must be a way to configure the plugin to work for this file structure, or at least for me to be able to submit the correct URLs needed for caching. Any help or advice from someone would be greatly appreciated.
Thanks in advance
Sham
- The topic ‘Woocommerce Cart page caching users addresses’ is closed to new replies.