This commit is contained in:
claudiulodro 2017-06-14 09:58:15 -07:00
parent 8bd7f89f73
commit 57c5bab731
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ class WC_Product_Variation_Data_Store_CPT extends WC_Product_Data_Store_CPT impl
public function read( &$product ) {
$product->set_defaults();
if ( ! $product->get_id() || ! ( $post_object = get_post( $product->get_id() ) ) || ! in_array( $post_object->post_type, array( 'product', 'product_variation' )) ) {
if ( ! $product->get_id() || ! ( $post_object = get_post( $product->get_id() ) ) || ! in_array( $post_object->post_type, array( 'product', 'product_variation' ) ) ) {
return;
}