includes/data-stores/class-wc-product-variation-data-store-cpt.php 1 location
|
@@ 50-52 (lines=3) @@
|
47 |
|
|
48 |
|
$post_object = get_post( $product->get_id() ); |
49 |
|
|
50 |
|
if ( ! $post_object || ! in_array( $post_object->post_type, array( 'product', 'product_variation' ), true ) ) { |
51 |
|
return; |
52 |
|
} |
53 |
|
|
54 |
|
$product->set_props( |
55 |
|
array( |
includes/wc-template-functions.php 1 location
|
@@ 135-137 (lines=3) @@
|
132 |
|
$post = get_post( $post ); |
133 |
|
} |
134 |
|
|
135 |
|
if ( empty( $post->post_type ) || ! in_array( $post->post_type, array( 'product', 'product_variation' ), true ) ) { |
136 |
|
return; |
137 |
|
} |
138 |
|
|
139 |
|
$GLOBALS['product'] = wc_get_product( $post ); |
140 |
|
|