How do I configure renewal invoicing?

If you are using our premium plugin, you will have the option to automatically create and send invoices for renewal orders, such as subscriptions. First you will have to download the WooCommerce Subscriptions plugin which you can find here. Setting it up Once you’ve acquired both WooCommerce Subscriptions and our premium plugin you can go to Read more about How do I configure renewal invoicing?[…]

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; $amount = 5; $woocommerce->cart->add_fee( ‘FEE_NAME’, $amount, true, ‘standard’ ); } add_action( ‘woocommerce_cart_calculate_fees’,’add_woocommerce_fee’ ); Please test the functionality on a development environment of your Read more about How do I add a fee to the invoice?[…]

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 method instead. /** * Change template based on WPML order language. * Make sure to create custom templates with the correct Read more about How do I use a different template based on an order variable?[…]

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[‘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’] Read more about How do I change common PDF options?[…]

How do I hide ‘Order Item’ meta?

In order to hide the order item meta from the invoice, simply add the following filter to your themes  functions.php /** * Hide order itemmeta on WooCommerce PDF Invoices’ 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’; Read more about How do I hide ‘Order Item’ meta?[…]

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 shortcode. This will only work if you replace “ORDER_ID” with an actual order id. Note: Download button will only be displayed when Read more about How do I display an invoice download button on specific template files?[…]