• Resolved ashikp

    (@ashikp)


    Hello There,
    I need to remove

     _dokan_commission_rate : 0
    _dokan_commission_type : percentage
    _dokan_additional_fee : 0 

    from the invoice. How I can do that I am not understanding

Viewing 1 replies (of 1 total)
  • Plugin Author WebToffee

    (@webtoffee)

    Hi @ashikp,

    To remove the unwanted meta from the invoice, please add below code snippet to your active child theme’s functions.php

    add_filter('wf_pklist_modify_meta_data', 'webtoffee_modify_meta_data', 10, 2);
    function webtoffee_modify_meta_data($meta) {
        // Below are the keys for bundled products and composite products - Change the array keys according to the needs
        $keys = array(
            '_dokan_commission_rate',
            '_dokan_commission_type',
            '_dokan_additional_fee'
        );
        foreach ($meta as $id => $value) {
            if (in_array($id, $keys) && $id !== 0) {
                if (isset($meta[$id])) {
                    unset($meta[$id]);
                }
            } else {
                $meta[$id] = $value . '<br />';
            }
        }
        return $meta;
    }
Viewing 1 replies (of 1 total)
  • The topic ‘How to remove dokan vendor tag from invoice’ is closed to new replies.