Skip to content

Commit

Permalink
fix: commssion displaying issue or vendor order listing page
Browse files Browse the repository at this point in the history
  • Loading branch information
sabbir1991 committed Oct 3, 2019
1 parent b024de5 commit 48a37e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion includes/class-commission.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ public function get_earning_by_order( $order, $context = 'seller' ) {
$saved_admin_fee = get_post_meta( $order->get_id(), '_dokan_admin_fee', true );

if ( $saved_admin_fee != '' ) {
return apply_filters( 'dokan_order_admin_commission', $saved_admin_fee, $order );
$saved_fee = ( 'seller' == $context ) ? $order->get_total() - $saved_admin_fee : $saved_admin_fee;
return apply_filters( 'dokan_order_admin_commission', $saved_fee, $order );
}

// Set user passed `order_id` so that we can track if any commission_rate has been saved previously.
Expand Down

0 comments on commit 48a37e5

Please sign in to comment.