Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Clear transient on post save
function yournamespace_delete_transient( $post_id, $post, $update ) {
//{your_post_type} with a custom post type
add_action('save_post_{your_post_type}', 'yournamespace_delete_transient', 10, 3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.