Skip to content

Commit

Permalink
fix: Updated order functions.php in includes (#827)
Browse files Browse the repository at this point in the history
* Updated order functions.php in includes

Fixes a bug where empty Seller IDs were returned by dokan_get_sellers_by.

* Fixed code formatting

Added space inside the second if condition in the dokan_get_sellers_by method.
  • Loading branch information
Thisura98 authored May 11, 2020
1 parent 1c7663f commit e5b8663
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion includes/Order/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,9 @@ function dokan_get_sellers_by( $order ) {

//New filter hook to modify the seller id at run time.
$seller_id = apply_filters( 'dokan_get_sellers_by', $seller_id, $item );
$sellers[$seller_id][] = $item;
if ( ! empty( $seller_id ) ) {
$sellers[ $seller_id ][] = $item;
}
}

return $sellers;
Expand Down

0 comments on commit e5b8663

Please sign in to comment.