Hi Angelo,
Regarding excluding backordered products from the invoice – please update the plugin to the newest v1.3.0. After that, please go to the document settings, and locate “HTML content” option (in “WooCommerce > Settings > PDF Invoicing > Your doc”).
By default, order products are displayed with:
[each_item]<tr><td>[prop name="item_nr"]</td><td>[prop name="item_name"]</td><td>[prop name="item_product_sku"]</td><td class="qty">[prop name="item_qty"]</td><td class="price">[prop name="item_single" format="price"]</td><td class="price">[prop name="item_total" format="price"]</td></tr>[/each_item]
Now to exclude products which are out of stock, we can use our [if]
shortcode:
[each_item][if value1="{prop name='item_product_func' func='get_stock_quantity'}" operator="greater" value2="0"]<tr><td>[prop name="item_nr"]</td><td>[prop name="item_name"]</td><td>[prop name="item_product_sku"]</td><td class="qty">[prop name="item_qty"]</td><td class="price">[prop name="item_single" format="price"]</td><td class="price">[prop name="item_total" format="price"]</td></tr>[/if][/each_item]
So basically, now before displaying product in the invoice, we are checking if product stock is greater than zero.
Please give it a try and let me know what you think.
P.S. Please note that this will not affect order total, etc. – it will only skip out-of-stock products in the order items table.