Merge pull request #17676 from woocommerce/update/17672

Clear transients when product terms are updated
This commit is contained in:
Mike Jolley 2017-11-17 12:21:53 +00:00 committed by GitHub
commit 8fe5d6bad0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -108,6 +108,9 @@ class WC_Post_Data {
foreach ( array_merge( $tt_ids, $old_tt_ids ) as $id ) { foreach ( array_merge( $tt_ids, $old_tt_ids ) as $id ) {
delete_transient( 'wc_ln_count_' . md5( sanitize_key( $taxonomy ) . sanitize_key( $id ) ) ); delete_transient( 'wc_ln_count_' . md5( sanitize_key( $taxonomy ) . sanitize_key( $id ) ) );
} }
if ( in_array( get_post_type( $object_id ), array( 'product', 'product_variation' ) ) ) {
self::delete_product_query_transients();
}
} }
/** /**