Title: inboundbe's Replies | WordPress.org

---

# inboundbe

  [  ](https://wordpress.org/support/users/inboundbe/)

 *   [Profile](https://wordpress.org/support/users/inboundbe/)
 *   [Topics Started](https://wordpress.org/support/users/inboundbe/topics/)
 *   [Replies Created](https://wordpress.org/support/users/inboundbe/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/inboundbe/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/inboundbe/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/inboundbe/engagements/)
 *   [Favorites](https://wordpress.org/support/users/inboundbe/favorites/)

 Search replies:

## Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Gift Wrapper for WooCommerce] Gift wrap not added to cart](https://wordpress.org/support/topic/gift-wrap-not-added-to-cart/)
 *  Thread Starter [inboundbe](https://wordpress.org/support/users/inboundbe/)
 * (@inboundbe)
 * [6 months, 3 weeks ago](https://wordpress.org/support/topic/gift-wrap-not-added-to-cart/#post-18732201)
 * Update: I had this option enabled “Accommodate templates from version 5?” in 
   the admin settings. I tried disabling that option to see what it would do. Problem
   is fixed now.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Gift Wrapper for WooCommerce] Gift wrap not added to cart](https://wordpress.org/support/topic/gift-wrap-not-added-to-cart/)
 *  Thread Starter [inboundbe](https://wordpress.org/support/users/inboundbe/)
 * (@inboundbe)
 * [6 months, 3 weeks ago](https://wordpress.org/support/topic/gift-wrap-not-added-to-cart/#post-18732178)
 * I setup a staging environment of my woocommerce shop, deactivated all plugins(
   except woocommerce & gift wrapper) and switched to the Storefront theme. I’m 
   still having the same issue unfortunately.
 * (If there’s a safe way to provide you with a login link?)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Gift Wrapper for WooCommerce] Gift wrap not added to cart](https://wordpress.org/support/topic/gift-wrap-not-added-to-cart/)
 *  Thread Starter [inboundbe](https://wordpress.org/support/users/inboundbe/)
 * (@inboundbe)
 * [7 months ago](https://wordpress.org/support/topic/gift-wrap-not-added-to-cart/#post-18721659)
 * Yes, sorry I meant version 6.3.
   It started malfunctioning from version 6.3 (and
   all versions after that). When I downgrade to version 6.2.5 it works.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PDF Invoices & Packing Slips for WooCommerce] Plugin creates invoices automatically for no reason](https://wordpress.org/support/topic/plugin-creates-invoices-automatically-for-no-reason/)
 *  Thread Starter [inboundbe](https://wordpress.org/support/users/inboundbe/)
 * (@inboundbe)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/plugin-creates-invoices-automatically-for-no-reason/#post-17865884)
 * They will be releasing a fix.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PDF Invoices & Packing Slips for WooCommerce] Plugin creates invoices automatically for no reason](https://wordpress.org/support/topic/plugin-creates-invoices-automatically-for-no-reason/)
 *  Thread Starter [inboundbe](https://wordpress.org/support/users/inboundbe/)
 * (@inboundbe)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/plugin-creates-invoices-automatically-for-no-reason/#post-17856051)
 * Update: We use YayMail – WooCommerce Email Customizer to customize our woocommerce
   e-mails.
   Whenever I disabled this email customizer plugin there were no invoices
   created. So I guess some incompatibility between the 2 plugins? But only very
   recently.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PDF Invoices & Packing Slips for WooCommerce] Plugin creates invoices automatically for no reason](https://wordpress.org/support/topic/plugin-creates-invoices-automatically-for-no-reason/)
 *  Thread Starter [inboundbe](https://wordpress.org/support/users/inboundbe/)
 * (@inboundbe)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/plugin-creates-invoices-automatically-for-no-reason/#post-17856034)
 * I noticed thate every change to an order I make that triggers the sending of 
   an e-mail triggers the creation of an invoice. Regardless of which e-mails should
   have an invoice attached to them.
   To give you an example. Adding a note in the
   order to be e-mailed to the customer also triggered the creation of the invoice.
 * What I did for testing purposes is disable the e-mail notifications for “Pending
   Order” and “Cancelled Order”. I then switched the order status to pending from
   cancelled and vice versa. No invoice was created then. So it would have something
   to do with the sending of e-mails.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PDF Invoices & Packing Slips for WooCommerce] Plugin creates invoices automatically for no reason](https://wordpress.org/support/topic/plugin-creates-invoices-automatically-for-no-reason/)
 *  Thread Starter [inboundbe](https://wordpress.org/support/users/inboundbe/)
 * (@inboundbe)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/plugin-creates-invoices-automatically-for-no-reason/#post-17855614)
 * Hi,
   I enabled that setting.Nothings gets added to the order logs when an invoice
   is created by placing new order or changing order status.Only when I manually
   create an invoice with the PDF Invoice button a order log gets added.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Admin and Site Enhancements (ASE)] Issue with Loco Translate](https://wordpress.org/support/topic/issue-with-loco-translate-2/)
 *  Thread Starter [inboundbe](https://wordpress.org/support/users/inboundbe/)
 * (@inboundbe)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/issue-with-loco-translate-2/#post-17510766)
 * Hi, thanks for looking into this 🙂
   I was away from work for a week, but I see
   the issue has already been resolved.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[GTM4WP - A Google Tag Manager (GTM) plugin for WordPress] Push custom metric only on purchase event](https://wordpress.org/support/topic/push-custom-metric-only-on-purchase-event/)
 *  Thread Starter [inboundbe](https://wordpress.org/support/users/inboundbe/)
 * (@inboundbe)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/push-custom-metric-only-on-purchase-event/#post-13883138)
 * I’ll take some of that back 🙂 It doesn’t seem to happen when an order gets processed/
   finished in the backend.
 * I changed my approach and created a new custom metric to start with a clean slate.
 * 1. I did a data import in GA consisting of 2 columns: ga:productSku and ga:metric2(
   which holds the individual cost of goods of each product)
    2. As GA now knows
   the “costs of good” of each product I don’t supply it to the datalayer myself
   anymore but instead I set the value of metric2 to 0 when we’re not on a purchase
   page.
 *     ```
       add_filter('gtm4wp_eec_product_array', 'inbound_gtm_product', 10, 2);
       function inbound_gtm_product($array, $event)
       {
           if ($event !== 'purchase') {
               $array['metric3'] = 0;
           }
           return $array;
       }
       ```
   
 * If I debug in GTM I see that this value is properly added to the datalayer.
    
   But for some reason GTM doesn’t respect that 0 value, could it be?
 * 3. Now after a couple of hours I see again lots of products with a “costs of 
   goods” that is higher than the product revenue …
    F.e. a product with an individual“
   costs of good” of 10.70 has been sold 3x but GA gives a value of 74.90 instead
   of 32.10.
 * Any idea what I could be doing wrong?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[GTM4WP - A Google Tag Manager (GTM) plugin for WordPress] Push custom metric only on purchase event](https://wordpress.org/support/topic/push-custom-metric-only-on-purchase-event/)
 *  Thread Starter [inboundbe](https://wordpress.org/support/users/inboundbe/)
 * (@inboundbe)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/push-custom-metric-only-on-purchase-event/#post-13881924)
 * Yes, I’m aware of that. But I probably will be adding some other values that 
   should be pushed always.
 * by the way, I’m actually still noticing some weird behavior after applying above
   behavior. I still see the cost of goods getting applied multiple times.
    I have
   the impression this metric also gets pushed when someone in the backend processes/
   finishes the order.
 * The metric actually should only get pushed when a customer completes an order
   in the frontend :/
 * In Analytics I’m doing profit/margin calculators based on this “costs of good”
   value but right now I’m experiencing large negative values for this which is 
   ofc impossible 🙂 So for some reason the value get pushed multiple times.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[GTM4WP - A Google Tag Manager (GTM) plugin for WordPress] Push custom metric only on purchase event](https://wordpress.org/support/topic/push-custom-metric-only-on-purchase-event/)
 *  Thread Starter [inboundbe](https://wordpress.org/support/users/inboundbe/)
 * (@inboundbe)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/push-custom-metric-only-on-purchase-event/#post-13873156)
 * I’m not entirely sure if I get it correctly but would something like this work?
 *     ```
       add_filter('gtm4wp_eec_product_array', 'inbound_gtm_product', 10, 2);
       function inbound_gtm_product($array, $event)
       {
           $product = get_product($array['id']);
   
           // cost of goods
           if ($event === 'purchase') {
               $array['metric1'] = get_post_meta($array['id'], 'yith_cog_cost', true);
           }
           return $array;
       }
       ```
   
 * Greetings

Viewing 11 replies - 1 through 11 (of 11 total)