Avoid caching extended info on Analytics -> Products (https://github.com/woocommerce/woocommerce-admin/pull/7819)
* Do not cache extended info -- this is required to get the latest stock data * Add changelog
This commit is contained in:
parent
5356726638
commit
6205c8ba01
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: Tweak
|
||||
|
||||
Avoid caching extended info #7819
|
|
@ -360,8 +360,6 @@ class DataStore extends ReportsDataStore implements DataStoreInterface {
|
|||
return $data;
|
||||
}
|
||||
|
||||
$this->include_extended_info( $product_data, $query_args );
|
||||
|
||||
$product_data = array_map( array( $this, 'cast_numbers' ), $product_data );
|
||||
$data = (object) array(
|
||||
'data' => $product_data,
|
||||
|
@ -373,6 +371,8 @@ class DataStore extends ReportsDataStore implements DataStoreInterface {
|
|||
$this->set_cached_data( $cache_key, $data );
|
||||
}
|
||||
|
||||
$this->include_extended_info( $data->data, $query_args );
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue