Permalink
Browse files

Stop testing for category ID - just return output if set

Poor logic begets poor logic
  • Loading branch information...
1 parent 6ea76cf commit aa2be49ca3cc97af54dffb22adb2700335423bb4 @1bigidea committed Mar 13, 2013
Showing with 2 additions and 5 deletions.
  1. +2 −5 wpsc-includes/display.functions.php
@@ -348,12 +348,9 @@ function wpsc_obtain_the_description() {
// Return Category Description
if ( is_numeric( get_query_var('category_id') ) ) {
- $category_id = get_query_var('category_id');
+ $output = wpsc_get_categorymeta( get_query_var('category_id'), 'description' );
} else if ( ! empty($_GET['category']) ) {
- $category_id = absint( $_GET['category'] );
- }
- if ( is_numeric( $category_id ) ) {
- $output = wpsc_get_categorymeta( $category_id, 'description' );
+ $output = wpsc_get_categorymeta( absint( $_GET['category'] ), 'description' );
}
// Return product content as description if product page

0 comments on commit aa2be49

Please sign in to comment.