Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dokan-Stripe connect enhancement - the total payment goes to vendors (minus stripe fees) therefore no commission goes for admin #2141

Open
Fsanya86 opened this issue Jan 11, 2024 · 0 comments

Comments

@Fsanya86
Copy link

Is your feature request related to a problem? Please describe.

With preserving current commissions, the total payment amount would go to vendors, therefore no commission for the admin account (even if commissions are set).
It is because the total commission is billed monthly to vendors.

Describe the solution you'd like

Add two apply_filters() hooks to /dokan-pro/modules/stripe/includes/IntentController.php

line 293:
$vendor_raw_earning = apply_filters( 'dokan_stripe_commission_seller', dokan()->commission->get_earning_by_order( $tmp_order, 'seller' ), $tmp_order );
original:
$vendor_raw_earning = dokan()->commission->get_earning_by_order( $tmp_order, 'seller' );

line 331:
$application_fee = apply_filters( 'dokan_stripe_commission_admin', dokan()->commission->get_earning_by_order( $tmp_order, 'admin' ) );
original:
$application_fee = dokan()->commission->get_earning_by_order( $tmp_order, 'admin' );

With these hooks, developers will have the opportunity to modify application fees at Stripe connect gateway.

Describe alternatives you've considered

Unfortunately I found no other solutions, because these variables are determined by
dokan()->commission->get_earning_by_order()
function, which is used in many other places, and its output cannot be altered only for this case.

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants