sandywp / plugins / woocommerce-pdf-invoices
Invoices for WooCommerce
Automatically generate and attach customizable PDF Invoices and PDF Packing Slips for WooCommerce to emails.
Ready in seconds.
v3.2.1 10,000+ installs PHP 7.4+

What you get inside
8 screens-
General settings
-
Template settings
-
View or Cancel invoice from the order page.
-
Create new invoice from the order page.
-
View invoice from the shop order page.
-
Download invoice from account.
-
Nice and clean template called 'Micro'.
-
Nice and clean template called 'Minimal'.
About this plugin
Invoicing can be time consuming. Well, not anymore! Invoices for WooCommerce automates the invoicing process by generating and sending it to your customers.
This WooCommerce plugin generates PDF invoices and PDF packing slips, attaches it to WooCommerce email types of your choice and sends invoices to your customers’ Dropbox, Google Drive, OneDrive or Egnyte. Choose between multiple clean and customizable templates.
Main features
- Automatic PDF invoice generation and attachment.
- Manually create or delete PDF invoice.
- Attach PDF invoice to multiple WooCommerce email types of your choice.
- Generate PDF packing slips.
- Connect with Google Drive, Egnyte, Dropbox or OneDrive.
- Multiple clean and highly customizable PDF Invoice templates.
- WooCommerce order numbering or built-in sequential invoice numbering.
- Many invoice and date format customization options.
- Advanced items table with refunds, discounts, different item tax rates columns and more.
- Download invoice from My Account page.
- Mark invoices as paid.
Invoices for WooCommerce Premium
This plugin offers a premium version which comes with the following features:
– Attach PDF invoices to many more email types including third party plugins
– Send credit notes and cancelled PDF invoices
– Fully customize PDF invoice table content by modifying line item columns and total rows
– Automatically send a reminder email configurable within a specific period of time and display a payment due date
– Bulk generate PDF invoices
– Bulk export and/or download PDF invoices
– Bill periodically by generating and sending global invoices
– Let customers decide to generate a PDF invoice on checkout
– Change the font of the PDF invoices
– Add additional PDF files to PDF invoices
– Send customer invoices directly to multiple recipients
– Compatible with WooCommerce Subscriptions plugin emails.
– Upgrade to Invoices for WooCommerce Premium >>
Support
Support can take place on the forum page, where we will try to respond as soon as possible.
Contributing
If you want to add code to the source code, report an issue or request an enhancement, feel free to use GitHub.
Translating
Contribute a translation on GitHub.
Questions
- How to add your custom template?
Copy the default template files (including folder) you’ll find in
plugins/woocommerce-pdf-invoices/includes/templates/invoice/simpletouploads/woocommerce-pdf-invoices/templates/invoice/simple. The plugin will automatically detect the template and makes it available for selection within the Template Settings. Now go ahead and start making some changes to the template files! 🙂Important: Before you update the plugin, always have a look at the Changelog if their have been any changes to the template files. There will be updates that require updating your custom template!
- How to add a fee to the invoice?
To add a fee to WooCommerce and your invoice, simply add the following action to your themes
functions.php.function add_woocommerce_fee() { global $woocommerce; if ( is_admin() && ! defined( 'DOING_AJAX' ) ) return; $amount = 5; $woocommerce->cart->add_fee( 'FEE_NAME', $amount, true, 'standard' ); } add_action( 'woocommerce_cart_calculate_fees','add_woocommerce_fee' );- How to hide order item meta?
To hide order item meta from the invoice, simply add the following filter to your themes
functions.php./** * Hide order itemmeta on Invoices for WooCommerce' invoice template. * * @param array $hidden_order_itemmeta itemmeta. * * @return array */ function bewpi_alter_hidden_order_itemmeta( $hidden_order_itemmeta ) { $hidden_order_itemmeta[] = '_wc_cog_item_cost'; $hidden_order_itemmeta[] = '_wc_cog_item_total_cost'; $hidden_order_itemmeta[] = '_subscription_interval'; $hidden_order_itemmeta[] = '_subscription_length'; // end so on.. return $hidden_order_itemmeta; } add_filter( 'bewpi_hidden_order_itemmeta', 'bewpi_alter_hidden_order_itemmeta', 10, 1 );- How to change the common PDF options?
To change the more common options of the PDF, use below example.
function custom_bewpi_mpdf_options( $options ) { $options['mode'] = ''; $options['format'] = ''; // use [format]-L or [format]-P to force orientation (A4-L will be size A4 with landscape orientation) $options['default_font_size'] = 0; $options['default_font'] = 'opensans'; $options['margin_left'] = 14; $options['margin_right'] = 14; $options['margin_top'] = 14; $options['margin_bottom'] = 0; $options['margin_header'] = 14; $options['margin_footer'] = 6; $options['orientation'] = 'P'; // Also try to force with format option return $options; } add_filter( 'bewpi_mpdf_options', 'custom_bewpi_mpdf_options' );- How to change the more advanced PDF options?
To fully customize the PDF, use below code. This filter gives you full control over the mPDF library. Check the mPDF manual for more info.
function bewpi_mpdf( $mpdf, $document ) { // change the direction of the invoice to RTL $mpdf->SetDirectionality( 'rtl' ); return $mpdf; } add_filter( 'bewpi_mpdf', 'bewpi_mpdf', 10, 2 );- How to display invoice download button on specific template files?
Add below code for example to your “thankyou” page or “customer-completed-order” email template.
echo do_shortcode( '[bewpi-download-invoice title="Download (PDF) Invoice {formatted_invoice_number}" order_id="' . $order->get_id() . '"]' );For use in WordPress editor use below shortcode. This will only work if you replace “ORDER_ID” with an actual order id.
[bewpi-download-invoice title="Download (PDF) Invoice {formatted_invoice_number}" order_id="ORDER_ID"]Note: Download button will only be displayed when PDF exists and order has been paid.
- How to skip invoice generation based on specific payment methods?
Add the name of the payment method to the array.
function bewpi_attach_invoice_excluded_payment_methods( $payment_methods ) { return array( 'bacs', 'cod', 'cheque', 'paypal' ); } add_filter( 'bewpi_attach_invoice_excluded_payment_methods', 'bewpi_attach_invoice_excluded_payment_methods', 10, 2 );- How to skip invoice generation in general?
Add below function to your themes ‘functions.php’ file.
function bewpi_skip_invoice_generation( $skip, $status, $order ) { // Do your stuff based on the order. return true; // True to skip. } add_filter( 'bewpi_skip_invoice_generation', 'bewpi_skip_invoice_generation', 10, 3 );
sandywp / also on the shelf
Try another plugin
PDF Invoices & Packing Slips for WooCommerce
5.0 · 300K+ installs
Create, print & automatically email PDF or XML Invoices & PDF Packing Slips for WooCommerce orders.
PDF Builder for WooCommerce. Create invoices,packing slips and more
4.7 · 2K+ installs
Create WooCommerce pdf invoices, packing slips, certificates and more, customized them as you want them with the best drag-drop…
4.6 · 1K+ installs
PDF Generator for WordPress allows you to convert posts into PDF files to share information across multiple channels.
Spin up a real WordPress site in seconds.
Test plugins, build a demo, hand a client a link — then squash it and start again. No local setup, no Docker.