wc_delete_product_transients for parent
This commit is contained in:
parent
8ede6bcb74
commit
7744879326
|
@ -829,6 +829,10 @@ class WC_Product_Data_Store_CPT extends WC_Data_Store_WP implements WC_Object_Da
|
||||||
*/
|
*/
|
||||||
protected function clear_caches( &$product ) {
|
protected function clear_caches( &$product ) {
|
||||||
wc_delete_product_transients( $product->get_id() );
|
wc_delete_product_transients( $product->get_id() );
|
||||||
|
if ( $product->get_parent_id( 'edit' ) ) {
|
||||||
|
wc_delete_product_transients( $product->get_parent_id( 'edit' ) );
|
||||||
|
}
|
||||||
|
WC_Cache_Helper::invalidate_attribute_count( array_keys( $product->get_attributes() ) );
|
||||||
WC_Cache_Helper::incr_cache_prefix( 'product_' . $product->get_id() );
|
WC_Cache_Helper::incr_cache_prefix( 'product_' . $product->get_id() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue