-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add dokan commission class (#582)
* feat: add few combine commission fields * feat: add dokan commission class * feat: add combine commission type * refactor: category was earning method * refactor: combine commission description * refactor: deprecate dokan_get_earning_by_product_function * refactor: deprecate dokan_get_earning_by_product_function is fixed #568 * refactor: update deprecated functions * refactor: calculate_commission method * refactor: vendor earning suggestion on product edit * refactor: check if method is callable before calling it * refactor: deprecate seller_id paramter from dokan_get_variable_product_earning function * refactor: increase commission by order item quantity * fix: return variable product earning * feat: add dokan commission test class * fix: remove normal commission field if combine commission is found * refactor: return additional_fee from the api response * feat: add earning column in order listing page * refactor: use DOKAN_LITE_SINCE instead of hardcoded version and line indentation * refactor: return earning for an order from the order_table * refactor: increase admin commission by order quantity for flat rate * feat: add set order_id and quantity method * fix: refund calculation for flat commission * fix: save commission rate, type, fee in order line_items instead of order * refactor: make Dokan_Commission static to non-static class * fix: reset static value after each iteration * if _dokan_admin_fee is found in a order meta, return the saved commission to keep backward compatability * refactor: get saved shipping and tax fee recipient * refactor: dokan_get_admin_commission_by function * fix: hide extra meta data * refactor: add a hook before calculation * refactor: ensure the product price is float * refactor: add backward compatibility when rendering variable product earning
- Loading branch information
1 parent
5feaec0
commit 153066f
Showing
18 changed files
with
1,492 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.