Merge pull request #21244 from rubn-g/fix/variable-product-cache-miss

Fix/variable product cache miss
This commit is contained in:
Claudiu Lodromanean 2018-09-06 15:17:27 -07:00 committed by GitHub
commit d9b5cf7b6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -504,7 +504,7 @@ class WC_Product_Variable extends WC_Product {
if ( false === $has_weight ) {
$has_weight = $this->data_store->child_has_weight( $this );
set_transient( $transient_name, $has_weight, DAY_IN_SECONDS * 30 );
set_transient( $transient_name, (int) $has_weight, DAY_IN_SECONDS * 30 );
}
return (bool) $has_weight;
@ -521,7 +521,7 @@ class WC_Product_Variable extends WC_Product {
if ( false === $has_dimension ) {
$has_dimension = $this->data_store->child_has_dimensions( $this );
set_transient( $transient_name, $has_dimension, DAY_IN_SECONDS * 30 );
set_transient( $transient_name, (int) $has_dimension, DAY_IN_SECONDS * 30 );
}
return (bool) $has_dimension;