Skip to content

Commit

Permalink
fix(countable-warning): fix countable warning on dokan_get_category_w…
Browse files Browse the repository at this point in the history
…ise_seller_commission function
  • Loading branch information
saimonh3 committed May 22, 2018
1 parent 804499f commit 3f1241c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2281,12 +2281,10 @@ function dokan_get_category_wise_seller_commission( $product_id, $category_id =
}

if ( $terms ) {
if ( 1 == count( $terms ) ) {
$category_commision = get_woocommerce_term_meta( $term_id, 'per_category_admin_commission', true );
}
$category_commision = get_woocommerce_term_meta( $term_id, 'per_category_admin_commission', true );
}

if ( !empty( $category_commision ) ) {
if ( ! empty( $category_commision ) ) {
return (float) $category_commision;
}

Expand Down

0 comments on commit 3f1241c

Please sign in to comment.