dwpriv
Forum Replies Created
-
Do you get this when you use a different printer or send the file to print using a different app?
Could you go to PDF Invoices > Advanced > Tools > Debugging and Logging and see if “Enable debug output” is active here? If so, deactivate it and see how that works.
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Invoice duplication issueOur plugin only prints the order data onto the PDFs, it doesn’t manipulate the orders themselves. Can you check the order notes for these duplicated orders to see if there are any clues there as to how they were created? Without such cases, the invoice numbers would proceed sequentially.
As for the invoices not being created or have data missing, can you share a screenshot of the back end order details for one these orders as well as the accompanying invoice, please?
Try this updated one
add_action( 'wpo_wcpdf_before_billing_address', 'wpo_wcpdf_company_vat', 10, 2 );
function wpo_wcpdf_company_vat( $template_type, $order ) {
if ( $template_type == 'invoice' ) {
$document = wcpdf_get_document( $template_type, $order );
$vat = $document->get_custom_field( 'billing_company_vat_number' );
if ( ! empty( $vat ) ) {
echo '<div>Company VAT No: ' . $vat . '</td>';
}
}
}It may be an issue of permission in those browser on iOS. You can trying downloading the PDFs in a private window in Chrome.
Does it work with Firefox or Chrome on the iPhone?
Try reinstall the fonts via PDF Invoices > Advanced > Tools > “Reinstall fonts”.
Replace it with this one
add_action( 'wpo_wcpdf_before_billing_address', 'wpo_wcpdf_company_vat', 10, 2 );
function wpo_wcpdf_company_vat( $template_type, $order ) {
if ( $order && $template_type == 'invoice' ) {
if ( $order->get_meta('billing_company_vat_number') ) {
?>
<tr class="company-vat">
<th>Company VAT No:</th>
<td><?php $document->custom_field('billing_company_vat_number'); ?></td>
</tr>
<?php
}
}
}In the “Attach to” settings, are you attaching the invoices to the “Renewal subscription” email notification?
You can check if the value is there first. Try this updated snippet
add_action( 'wpo_wcpdf_before_billing_address', 'wpo_wcpdf_company_vat', 10, 2 );
function wpo_wcpdf_company_vat( $template_type, $order ) {
if ( $template_type == 'invoice' ) {
$document->custom_field( 'billing_company_vat_number' );
if ( ! empty( $document ) ) {
if ( $document->custom_field('billing_company_vat_number') ) {
?>
<tr class="company-vat">
<th>Company VAT No:</th>
<td><?php $document->custom_field('billing_company_vat_number'); ?></td>
</tr>
<?php
}
}
}
}Does this also happen on the desktop as well? If only on the mobile, are you downloading from the emails or in the Woocommerce app back end?
Not as yet, unfortunately. However you can try this code snippet that should do the same
/**
* PDF Invoices & Packing Slip for WooCommerce:
* Reverse the colors of the order table header
*/
add_action( 'wpo_wcpdf_custom_styles', function ( $document_type, $document ) {
?>
.order-details thead th {
color: black;
background-color: transparent;
border-color: #ccc;
}
<?php
}, 10, 2 );If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use code snippets.
We also have a blog post here that you may find helpful about adding custom code to your site.
@tezalsec the update is live now, so you can give it a try and let us know if it resolves your issue
We released
v5.2.0of the plugin today. Could you run the update and see if the issue persists?@sa1ntc You should be able to create an
uploadsfolder in thewp-contentfolder and try again.