Skip to content

Commit 2839078

Browse files
committed
Avoid wpsc_has_variations processing when no variations terms are defined
1 parent 0fb2506 commit 2839078

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

wpsc-includes/product-template.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,10 @@ function wpsc_product_has_children( $id, $exclude_unpublished = true ){
269269
function wpsc_product_has_variations( $id = 0 ) {
270270
static $has_variations = array();
271271

272+
if ( ! wpsc_variations::variations_are_being_used() ) {
273+
return false;
274+
}
275+
272276
if ( ! $id )
273277
$id = get_the_ID();
274278

0 commit comments

Comments
 (0)