Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add filters to exclude post types #342

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gutobenn
Copy link

@gutobenn gutobenn commented Jun 25, 2024

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
Copy link

gridpane commented Jul 2, 2024

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

#344

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

@gridpane
Copy link

gridpane commented Jul 4, 2024

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

master...gridpane:nginx-helper:master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants