rtCamp / nginx-helper

Nginx Helper for WordPress caching, permalinks & efficient file handling in multisite
https://wordpress.org/plugins/nginx-helper/
224 stars 117 forks source link

Add filters to exclude post types #342

Open gutobenn opened 1 week ago

gutobenn commented 1 week ago

This PR adds two filters for disabling post types from triggering a purge.

In my case I am using it to exclude woocommerce orders:

add_filter( 'rt_nginx_helper_exclude_post_types', function( $post_types ) { $post_types[] = 'shop_order'; return $post_types; } );
add_filter( 'rt_nginx_helper_comment_change_exclude_post_types', function( $post_types ) { $post_types[] = 'shop_order'; return $post_types; } );
gridpane commented 3 days ago

Yeah this is necessary to work with woocommerce now... if this doesn't get merged, I am going to add it to my PR

https://github.com/rtCamp/nginx-helper/pull/344

We are using this in production now, includes constants, torden module, proper redis connection configuration etc.

gridpane commented 1 day ago

This was lingering, and is needed... I added into my PR

https://github.com/rtCamp/nginx-helper/compare/master...gridpane:nginx-helper:master