Skip to content

Commit

Permalink
Avoid wpsc_has_variations processing when no variations terms are def…
Browse files Browse the repository at this point in the history
…ined
  • Loading branch information
JeffPyeBrook committed Nov 2, 2014
1 parent 0fb2506 commit 2839078
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wpsc-includes/product-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ function wpsc_product_has_children( $id, $exclude_unpublished = true ){
function wpsc_product_has_variations( $id = 0 ) {
static $has_variations = array();

if ( ! wpsc_variations::variations_are_being_used() ) {
return false;
}

if ( ! $id )
$id = get_the_ID();

Expand Down

0 comments on commit 2839078

Please sign in to comment.