Hello @fkoomek
I am sorry about the issue you are experiencing and I am happy to assist you with this.
Have you tried purging those pages programmatically using w3tc_flush_url($url)
E.G.
w3tc_flush_url(‘http://domain.com/page?query=1’);
Thank you!
Hello.
Thank you for your help.
Your code works only for a particular page. Is there a way how to purge all pages containing “?filter” ? For examples this is full URL:
https://www.test.liberlapidum.com/cs/?filters=country%5Bpakistan%5D
But I need to purge every page containing ?filters.
Thank you
-
This reply was modified 6 years, 1 month ago by
fkoomek.
Hello @fkoomek
Thank you for the information.
While we are checking this you can try a custom code and hook onto the post-update hook, fetch all posts in the same tag/category and call w3tc_flush_url($url) on those posts.
I’ll reply back after we make tests.
Thank you!
Thank you for the reply.
But I don’t understand how that could help me in my case. I need to clear URLs containing certain query strings which are created dynamicaly.
I will wait for further assistance π
Hello Marko. Do you have any news please?
Thank you.
Radan
Hello @fkoomek
We are still testing this but it appears that URL with query strings are not getting purged.
We’ll let you know as soon as we perform some more testing.
Thank you!
Hello.
Any news, please?
Thank you
Hello @fkoomek
Sorry for the delay. We are still checking this.
Once again sorry for the delay.
Hello Marko. Any progress?
Thanks
Is it really possible to purge products list page every time a new product is updated. You achieved that @fkoomek ? Tks! π
Hi.
It’s possible to purge all categories containing the given product when the product is updated. And also all attributes pages related to the product. In “Purge Policy: Page Cache” section I have checked these options: Front page, Posts Page, Post Page, Post terms pages, Post terms feeds. I am not sure if all of the options are needed to be checked but it works.
-
This reply was modified 5 years, 6 months ago by
fkoomek.
It seems the product shows up for the category page, but not for the general products list, like /shop/ list. But for /category-product/ is shows up. Any more idea? Tks! π
Hello.
So are you saying that your “shop” page which is defined by Woocommerce is not purged? That’s weird. You could try to purge URLs programmatically. You can try to use this code:
add_action('woocommerce_update_product', 'mp_sync_on_product_save', 10, 1);
function mp_sync_on_product_save()
{
w3tc_flush_url($url);
}
Just replace $url with the exact URL you need to purge.
But there could be a problem when you have more pages of the “product list”.
So you would probably have to include all pages like:
add_action('woocommerce_update_product', 'mp_sync_on_product_save', 10, 1);
function mp_sync_on_product_save()
{
w3tc_flush_url('https://www.yoursite.com/shop/');
w3tc_flush_url('https://www.yoursite/shop/page/2/');
w3tc_flush_url('https://www.yoursite/shop/page/3/');
}
…
Be sure to include the exact address including the right certificate (if you don’t have an SSL certificate you would use http://)…
Code goes into your functions.php