doctordisco
Forum Replies Created
-
Thank you very much!
Forum: Themes and Templates
In reply to: [OceanWP] Link on Top Bar adds extra lineTHANK 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
In reply to: [OceanWP] Link on Top Bar adds extra lineI 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
In reply to: [OceanWP] Link on Top Bar adds extra lineI 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.”
Forum: Themes and Templates
In reply to: [OceanWP] Link on Top Bar adds extra lineDear 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:
}
}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!!!
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 onceI 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
Following the steps from the link above: 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.
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.
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.
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.
since WordPress doesn’t allow us to provide support or answering pre-sale questions for paid plugins in this forum
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, 11 months ago by doctordisco.
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 2 years, 11 months ago by doctordisco.
- This reply was modified 2 years, 11 months ago by doctordisco.
- This reply was modified 2 years, 11 months ago by doctordisco.
Forum: Plugins
In reply to: [WooCommerce] Meta – Custom Field illegal characters or syntax rulesThanks. 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.
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.
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
In reply to: [WooCommerce] Meta – Custom Field illegal characters or syntax rulesI 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.