Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author WebToffee

    (@webtoffee)

    Hi @wwwnews,

    We can help you with it. Copy the below code snippet to your active theme’s functions.php to remove unwanted metadata from displaying on invoices.

    add_filter('wf_pklist_modify_meta_data', 'wf_modify_meta_data', 10, 2);
    
    function wf_modify_meta_data($meta) {
        $keys = array('_woobt_ids');
        foreach ($meta as $id => $value) {
            if (in_array($id, $keys)) {
                if (isset($meta[$id])) {
                    unset($meta[$id]);
                }
            }
        }
        return $meta;
    }
    Thread Starter wwwnews

    (@wwwnews)

    This code worked partially

    after adding code https://prntscr.com/nlva4v
    before adding code https://prntscr.com/nlvajk

    Plugin Author WebToffee

    (@webtoffee)

    Hi @wwwnews,

    You can add more meta keys to the snippet as shown below to remove more any unwanted meta values.

    add_filter('wf_pklist_modify_meta_data', 'wf_modify_meta_data', 10, 2);
    
    function wf_modify_meta_data($meta) {
        $keys = array('_woobt_ids','_woobt_parent_id' );
        foreach ($meta as $id => $value) {
            if (in_array($id, $keys)) {
                if (isset($meta[$id])) {
                    unset($meta[$id]);
                }
            }
        }
        return $meta;
    }

    Refer article here.

    Thread Starter wwwnews

    (@wwwnews)

    I am sorry to bother again. How do I know what additional keys to enter?

    Plugin Author WebToffee

    (@webtoffee)

    Hi @wwwnews,

    It depends on the plugin you are using. The meta key will appear on the invoice. We added the two from the screenshot you shared.

    Thread Starter wwwnews

    (@wwwnews)

    Yes awesome this worked now I understand how this works thank you.

    Plugin Author WebToffee

    (@webtoffee)

    Hi @wwwnews,

    Great. If you like our plugin and support, please leave us a review.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Data being added to product title’ is closed to new replies.