• Resolved akaygaur

    (@akaygaur)


    Dear Team,

    I hope this message finds you well. I am seeking your guidance regarding overriding the commission calculation in Dokan plugin using the function.php file in my WordPress theme.

    I need to modify the commission calculation formula by replacing $earning = ( $product_price * $commission_rate ) / 100; with $earning = ( $product_price * $commission_rate ) / 110;.

    The relevant code snippet from the Dokan plugin’s file that requires modification is as follows:

    if ( 'percentage' === $commission_type ) {
        $earning = ( $product_price * $commission_rate ) / 110;
        $earning = $product_price - $earning;
    
        // vendor will get 100 percent if commission rate > 100
        if ( $commission_rate > 100 ) {
            $earning = $product_price;
        }
    }

    As I would like to avoid modifying the plugin directly, I am seeking guidance on how to implement this change through the function.php file in my theme.

    I would greatly appreciate it if you could provide the necessary instructions or code snippet to override the calculation logic successfully.

    Thank you for your attention and support. I look forward to your prompt response. ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @akaygaur,

    You wish to customize the commission calculation of the Dokan plugin. It would involve advanced customization.

    Please note that according to our?support policy, we are unable to provide further assistance regarding this custom work.

    To achieve your specific requirements, we recommend hiring a professional WordPress developer who can help you with the necessary customization.

    Thanks for understanding.

    Plugin Support Tanvir Hasan

    (@tanvirh)

    Hi @akaygaur

    As we haven’t heard back from you for a while, we’ll consider this topic resolved. If you encounter any further issues, please don’t hesitate to open a new topic.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to overwrite dokan commision file code using function.php’ is closed to new replies.