Title: doctordisco's Replies | WordPress.org

---

# doctordisco

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

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

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 28 total)

1 [2](https://wordpress.org/support/users/discomidget/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/discomidget/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Wordfence Security - Firewall, Malware Scan, and Login Security] new CC testing attack](https://wordpress.org/support/topic/new-cc-testing-attack/)
 *  Thread Starter [doctordisco](https://wordpress.org/support/users/discomidget/)
 * (@discomidget)
 * [11 months ago](https://wordpress.org/support/topic/new-cc-testing-attack/#post-18562011)
 * Thank you very much!
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[OceanWP] Link on Top Bar adds extra line](https://wordpress.org/support/topic/link-on-top-bar-adds-extra-line/)
 *  Thread Starter [doctordisco](https://wordpress.org/support/users/discomidget/)
 * (@discomidget)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/link-on-top-bar-adds-extra-line/#post-17757838)
 * THANK YOU! That worked. I looked at the code behind the post and saw the “<p>”
   tags just like you mentioned. I added the CSS and now the top bar appears correctly.
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[OceanWP] Link on Top Bar adds extra line](https://wordpress.org/support/topic/link-on-top-bar-adds-extra-line/)
 *  Thread Starter [doctordisco](https://wordpress.org/support/users/discomidget/)
 * (@discomidget)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/link-on-top-bar-adds-extra-line/#post-17752630)
 * I can’t figure out why adding a link to the top bar content makes it take up 
   2 horizontal lines of space instead of one.
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[OceanWP] Link on Top Bar adds extra line](https://wordpress.org/support/topic/link-on-top-bar-adds-extra-line/)
 *  Thread Starter [doctordisco](https://wordpress.org/support/users/discomidget/)
 * (@discomidget)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/link-on-top-bar-adds-extra-line/#post-17751977)
 * I tried the code and see that links now have an underline. But what I was referring
   to is “when I add a link, an extra line of space is added below the content.”
 * [screenshot of top bar with and without link](https://www.dropbox.com/scl/fi/r20gqzu6w5ce41u1apncp/top-bar-examples.jpg?rlkey=ryw8w6ycv4z0wxj2lrvyhrxio&dl=0)
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[OceanWP] Link on Top Bar adds extra line](https://wordpress.org/support/topic/link-on-top-bar-adds-extra-line/)
 *  Thread Starter [doctordisco](https://wordpress.org/support/users/discomidget/)
 * (@discomidget)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/link-on-top-bar-adds-extra-line/#post-17748392)
 * Dear Shahin,
 * Thank you VERY MUCH for your detailed response. I have existing code in the CSS
   code area and Custom JS is blank. Would I simply copy and paste the CSS code 
   above below the existing code? I will brush up on CSS before I add anything. 
   Are there considerations for what should be at the end of all of the code? Right
   now the existing code ends with:
 * }
   }
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PDF Invoices & Packing Slips for WooCommerce] Custom field hook not appearing in PDF attached to email](https://wordpress.org/support/topic/custom-field-hook-not-appearing-in-pdf-attached-to-email/)
 *  Thread Starter [doctordisco](https://wordpress.org/support/users/discomidget/)
 * (@discomidget)
 * [2 years, 12 months ago](https://wordpress.org/support/topic/custom-field-hook-not-appearing-in-pdf-attached-to-email/#post-16834397)
 * I cautiously (and incorrectly) had set the snippet to only run in the administration
   area. Once I changed it to ‘run snippet everywhere’ I am receiving invoices with
   custom product field attached to emails. THANK YOU very much for all of your 
   help!!!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PDF Invoices & Packing Slips for WooCommerce] Custom field hook not appearing in PDF attached to email](https://wordpress.org/support/topic/custom-field-hook-not-appearing-in-pdf-attached-to-email/)
 *  Thread Starter [doctordisco](https://wordpress.org/support/users/discomidget/)
 * (@discomidget)
 * [2 years, 12 months ago](https://wordpress.org/support/topic/custom-field-hook-not-appearing-in-pdf-attached-to-email/#post-16830913)
 * Thank you for your reply.  Based on your comments, I found a possible issue. 
   I had the snippet set to ‘ administration area ‘
 *     Run snippet everywhere  
   x  Only run in administration area   Only run on
   site front-end   Only run once
 * I have changed it to ‘ run everywhere ‘  let me see if that allows the emails
   to have the correct PDF attached.
 * Thanks again for your help. This is my first experience with php and code snippets.
 * -Kevork
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PDF Invoices & Packing Slips for WooCommerce] Custom field hook not appearing in PDF attached to email](https://wordpress.org/support/topic/custom-field-hook-not-appearing-in-pdf-attached-to-email/)
 *  Thread Starter [doctordisco](https://wordpress.org/support/users/discomidget/)
 * (@discomidget)
 * [2 years, 12 months ago](https://wordpress.org/support/topic/custom-field-hook-not-appearing-in-pdf-attached-to-email/#post-16828637)
 * Following the steps from the link above: [displaying-product-custom-fields/](https://docs.wpovernight.com/woocommerce-pdf-invoices-packing-slips/displaying-product-custom-fields/)
 * It is a _product custom field_ that has meta in front of it – Meta: sku_RE I 
   added ‘sku_RE’ in place of ‘Location’ in the code provided.
 *     ```wp-block-code
       add_action( 'wpo_wcpdf_before_item_meta', 'wpo_wcpdf_product_custom_field', 10, 3 );
       function wpo_wcpdf_product_custom_field ( $template_type, $item, $order ) {
           // check if product exists first
           if (empty($item['product'])) return;
   
           // replace 'Location' with your custom field name!
           $field_name = 'sku_RE';
           $sku_RE = $item['product']->get_meta($field_name,true,'edit');
           if (!empty($sku_RE)) {
               echo '<div class="product-sku_RE">sku_RE: '.$sku_RE.'</div>';
           }
       }
       ```
   
 * When I tried it with ‘Meta:’ in front of it, it gave an error.
 * To clarify, I am referring to the PDF invoice attached to the email.
 * Thank you for your help.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PDF Invoices & Packing Slips for WooCommerce] Custom field hook not appearing in PDF attached to email](https://wordpress.org/support/topic/custom-field-hook-not-appearing-in-pdf-attached-to-email/)
 *  Thread Starter [doctordisco](https://wordpress.org/support/users/discomidget/)
 * (@discomidget)
 * [2 years, 12 months ago](https://wordpress.org/support/topic/custom-field-hook-not-appearing-in-pdf-attached-to-email/#post-16828440)
 * Thanks very much for replying. This is a meta custom field ‘ sku_RE ‘ that is
   a second sku number. I added it by exporting the products as csv, adding a meta
   column and importing. If I need to add or change that field, I repeat the export
   to csv, edit and import.
 * After adding the action hook code snippet above, the meta custom field ‘ sku_RE‘
   appears on invoices from the Woo backend but not on any email, regardless of 
   stage.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PDF Invoices & Packing Slips for WooCommerce] Custom field hook not appearing in PDF attached to email](https://wordpress.org/support/topic/custom-field-hook-not-appearing-in-pdf-attached-to-email/)
 *  Thread Starter [doctordisco](https://wordpress.org/support/users/discomidget/)
 * (@discomidget)
 * [2 years, 12 months ago](https://wordpress.org/support/topic/custom-field-hook-not-appearing-in-pdf-attached-to-email/#post-16827034)
 * I have not been having success communicating via email. It was recommended that
   I do so because some of the answers may have been to suggest the paid plugin.
   After following the link below to add a custom field added with a code snippet,
   the invoices attached to ANY email do not show the custom field. However, when
   I click on the icon in the Woocommerce orders area, THAT invoice shows the custom
   field. I have tried the recommended troubleshooting and not been able to reason
   why the backend invoice and email attached invoice are different.
 * [https://docs.wpovernight.com/woocommerce-pdf-invoices-packing-slips/displaying-product-custom-fields/](https://docs.wpovernight.com/woocommerce-pdf-invoices-packing-slips/displaying-product-custom-fields/)
 * > > since WordPress doesn’t allow us to provide support or answering pre-sale
   > > questions for paid plugins in this forum
 *     ```wp-block-code
       Using an action hook
       If you’ve never edited your themes functions.php before, make sure to read this first.
   
       Let’s say your custom field is called ‘Location’, you can display this below the product description with the following code:
   
       add_action( 'wpo_wcpdf_after_item_meta', 'wpo_wcpdf_product_custom_field', 10, 3 );
   
       function wpo_wcpdf_product_custom_field ( $template_type, $item, $order ) {
   
           // check if product exists first
   
           if (empty($item['product'])) return;
   
           // replace 'Location' with your custom field name!
   
           $field_name = 'Location';
   
           $location = $item['product']->get_meta($field_name,true,'edit');
   
           if (!empty($location)) {
   
               echo '<div class="product-location">Location: '.$location.'</div>';
   
           }
   
       }
       ```
   
    -  This reply was modified 2 years, 12 months ago by [doctordisco](https://wordpress.org/support/users/discomidget/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PDF Invoices & Packing Slips for WooCommerce] Custom field hook not appearing in PDF attached to email](https://wordpress.org/support/topic/custom-field-hook-not-appearing-in-pdf-attached-to-email/)
 *  Thread Starter [doctordisco](https://wordpress.org/support/users/discomidget/)
 * (@discomidget)
 * [3 years ago](https://wordpress.org/support/topic/custom-field-hook-not-appearing-in-pdf-attached-to-email/#post-16792768)
 * I followed the directions to receive a ‘bcc’ of the order notification for ‘processing’
   that is sent to the customer. The invoice attached to that email is the same 
   as the one attached to the ‘new order.’ Initially you were saying,
 * >  Maybe your custom field is filled after the order is placed? If so, you could
   > send the PDF invoices in a later stage, e.g. when the order has reached the
   > _Processing_
 * Again, after customization, when I click on the ‘action’ in orders, the invoice
   has my custom field, but the invoices attached to ‘new order’ and ‘processing’
   don’t have the custom field.
 * If the solution for this is the paid version of the plugin, I will respond further
   in email.
    -  This reply was modified 3 years ago by [doctordisco](https://wordpress.org/support/users/discomidget/).
    -  This reply was modified 3 years ago by [doctordisco](https://wordpress.org/support/users/discomidget/).
    -  This reply was modified 3 years ago by [doctordisco](https://wordpress.org/support/users/discomidget/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Meta – Custom Field illegal characters or syntax rules](https://wordpress.org/support/topic/meta-custom-field-illegal-characters-or-syntax-rules/)
 *  Thread Starter [doctordisco](https://wordpress.org/support/users/discomidget/)
 * (@discomidget)
 * [3 years ago](https://wordpress.org/support/topic/meta-custom-field-illegal-characters-or-syntax-rules/#post-16792754)
 * Thanks. I was definitely able to import ‘stock#’ as a meta: custom field. It 
   was presenting a problem later when I was trying to use that custom field.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PDF Invoices & Packing Slips for WooCommerce] Custom field hook not appearing in PDF attached to email](https://wordpress.org/support/topic/custom-field-hook-not-appearing-in-pdf-attached-to-email/)
 *  Thread Starter [doctordisco](https://wordpress.org/support/users/discomidget/)
 * (@discomidget)
 * [3 years ago](https://wordpress.org/support/topic/custom-field-hook-not-appearing-in-pdf-attached-to-email/#post-16789930)
 * When I look into the Woocommerce settings, it looks like Processing and Completed
   go to the customer. I don’t see a simple way to add my admin email to those. 
   It wouldn’t make sense for my customers to receive the invoice _with the custom
   sku_.
 *  I will definitely contact you by email to find out more about if the paid version
   is what I need.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PDF Invoices & Packing Slips for WooCommerce] Custom field hook not appearing in PDF attached to email](https://wordpress.org/support/topic/custom-field-hook-not-appearing-in-pdf-attached-to-email/)
 *  Thread Starter [doctordisco](https://wordpress.org/support/users/discomidget/)
 * (@discomidget)
 * [3 years ago](https://wordpress.org/support/topic/custom-field-hook-not-appearing-in-pdf-attached-to-email/#post-16787040)
 * Hello,
 * Thanks for your quick reply. How could I send the PDF invoices in a later stage?
   It is automated. Do you mean manually? Or in settings/documents, under the Attach
   to: it says Disable for: ‘Select one or more statuses’. Is this what you mean?
   Or is that something I would enter in code? Do I want Woocommerce to wait to 
   send the order email – New order (Admin email) so that it does so after the custom
   field has been added to the invoice?
 * I forward the New order email with the pdf invoice attached to the office once
   I check the order details. I added the custom field with a second sku number 
   that helps to identify the product on the shelf (we also have a physical retail
   store).
 * At this point, I am opening the New order email, deleting the attached pdf invoice,
   logging into WordPress, downloading the pdf invoice and attaching it to the new
   order email that I forward to the office. Hopefully there is something I can 
   do so that the PDF invoice that goes into the automated New Order email appears
   the same as the PDF invoice in Woocommerce.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Meta – Custom Field illegal characters or syntax rules](https://wordpress.org/support/topic/meta-custom-field-illegal-characters-or-syntax-rules/)
 *  Thread Starter [doctordisco](https://wordpress.org/support/users/discomidget/)
 * (@discomidget)
 * [3 years ago](https://wordpress.org/support/topic/meta-custom-field-illegal-characters-or-syntax-rules/#post-16780776)
 * I could not modify visibility of meta: custom fields in the admin backend until
   exported products to csv using the included export/import function. I clicked
   the box to ‘include meta’ changed the column header in Google sheets (to preserve
   file integrity) then imported, checking the box again. When it showed the columns
   being imported, it showed meta: sku_RE. By changing meta: stock# to meta: sku_RE,
   I fixed the compatibility error I was having and used code snippets and PHP to
   now see the meta custom field on orders.

Viewing 15 replies - 1 through 15 (of 28 total)

1 [2](https://wordpress.org/support/users/discomidget/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/discomidget/replies/page/2/?output_format=md)