• Resolved gilesytheking

    (@gilesytheking)


    Hey, this is one of the most useful plugins on my woo store and I’m glad you have started developing / updating the plugin.

    After the recent update, I have noticed that the cost of goods (from WooCommerce Cost of Goods plugin) is being printed on the invoice / delivery note. Please see screen shot – https://prnt.sc/gi5yf2

    Obviously i don’t want to customers to see the actual cost of goods. If you could look into and hopefully offer a fix for this that would be great.

    Keep up the good work. TIA

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Same problem here. Your plugin is fantastic – I totally depend on it.
    This problem with the COGs data appearing, began since the last update.
    Any clues?

    Thanks lots,
    Anna

    @wildandwoolly & @gilesytheking wouldn’t normally recommend a rubbish & hacky fix like this but invoices sometimes can’t wait! Hopefully @tychesoftwares will provide a hook to exlcude fields in the near future. For the time being you can try this.

    Add these 2 lines inside the foreach loop on line 116 in woocommerce-delivery-notes/templates/print-order/print-content.php

    
    foreach ($item['item_meta'] as $key => $value) {												
        $excluded_fields = ['_wc_cog_item_cost', '_wc_cog_item_total_cost'];													
        if (in_array($key, $excluded_fields)) continue;														
        ...
    

    Hope it helps while we wait for a proper fix!

    Thread Starter gilesytheking

    (@gilesytheking)

    @slowrush thanks for your response. I found the below code on line 231…

    foreach ($item['item_meta'] as $key => $value) {

    I added your 2 lines of code below that, which seems to have fixed the issue. Note I also excluded _price as that was also displaying as a meta value. Everything working fine now with my invoices.

    $excluded_fields = ['_wc_cog_item_cost', '_wc_cog_item_total_cost', '_price'];													
        if (in_array($key, $excluded_fields)) continue;
    Plugin Author tychesoftwares

    (@tychesoftwares)

    Hey @wildandwoolly & @gilesytheking, We will have this checked tomorrow & work out a fix.

    Will try to release the fix at the earliest after testing it at our end.

    @slowrush – Thanks for posting that quick hack.

    Is there already a fix, because I have to make a lot of invoices and don’t want to show the cost of goods on it.

    I’m not very good in changing the code ??

    I just tried to do it as described above and I did it ?? It works fine now.

    Thanks!

    Plugin Author tychesoftwares

    (@tychesoftwares)

    @sylvie_janssens, a fix has been applied today & we are testing it with a few other plugins as well.

    A release is expected tomorrow.

    :Vishal

    I’m not having issues with cost of goods – but am having issues with the database codes showing as of last update. https://prnt.sc/gkbeip – guessing related to same issue?

    Navajo Fleece Lined Saddle Pad
    _tmcartepo_data:Array
    _tm_epo_product_original_price:Array
    _tm_epo:Array
    Style:Cream Black
    1
    Navajo Fleece Lined Saddle Pad
    _tmcartepo_data:Array
    _tm_epo_product_original_price:Array
    _tm_epo:Array
    Style:Blue Black

    Plugin Author tychesoftwares

    (@tychesoftwares)

    Hi Everyone,

    The new update v4.3.3 has the fix for removing the unwanted attributes. These include attributes from any plugins. So every attribute beginning with an _ (underscore) will not be shown on the invoice.

    :Vishal

    Thread Starter gilesytheking

    (@gilesytheking)

    Thanks for the fast responses and updates. You guys are awesome for keeping this plugin alive.

    Plugin Author tychesoftwares

    (@tychesoftwares)

    Thanks @gilesytheking.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Cost of goods displaying on Invoice / delivery note’ is closed to new replies.