Search this Topic
How do I update a PDF that has already been sent out? Since version 2.9.4 the plugin removed the ability to update the PDF invoice when it already has been sent to the customer. If in what manner you still want to update the invoice, you can do so by resetting a custom field. Go to ...
Read more How do I change the invoice date? In order to change the invoice date, simply add the following filter to your themes functions.php /**
* Change invoice date to order date in order to regenerate old invoices and keep the date.
*
* @param string $invoice_date date of invoic...
Read more How do I use a different template based on an order variable? In order to use a different template based on an order variable, simply add the following filter to your themes functions.php You can, for example, change the function to use a different template based on the payment me...
Read more How do I add a fee to the invoice? In order 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; ...
Read more How do I change the more advanced PDF options? In order to change the more common options for your PDFs, simply add the following action to your themes functions.phpThis filter gives you full control over the mPDF library. Check the mPDF manual for more info. function bewpi_mpdf( $mpdf, $docu...
Read more How do I add custom fields or meta-data to the PDF invoice templates? In order to add custom fields or meta-data, use the below code to display meta-data. Replace {META_KEY} with the actual key. If you use another plugin, just ask the key from the author of that plugin. <?php echo BEWPI()-...
Read more How to change the template based on user roles? In order to change the template based on specific user roles have a look at below filter code example. /**
* Change template name based on user role.
* Make sure to create custom templates with the correct names or the templates won't be found...
Read more How do I display an invoice download button on specific template files? In order to display an invoice download button, add the below code for example to your “thank you” page or “customer-completed-order” email template. echo do_shortcode( '' ); For use in WordPress editor use below...
Read more How do I change common PDF options? In order to change the more common options for your PDFs, simply add the following action to your themes functions.php function custom_bewpi_mpdf_options( $options ) {
$options = '';
$options = ''; // use -L or -P to force orientation (A4-L will be ...
Read more How to add zero rated Tax/VAT for intra-community goods? In order to add zero rated Tax/VAT for intra-community goods to your complete website use below filters. It will show the Tax/VAT on the cart and will permanently add it to the order and thus on the invoice. /**
* Add zero rated tax wh...
Read more