Filter for Invoice Columns
-
Hi,
First off, thanks a lot for the great plugin.
In our webshop we have different customer roles (B2B and B2C). For B2B customers the SKU and VAT per product is important, for B2C customer not.
Therefore I’d like show the two columns based on the order type (B2B/B2C). The columns are already dynamically shown or hidden based on the template settings:
bewpi_show_sku
andbewpi_show_tax
. However, there is no filter to modify this behavior more dynamically.Something like this would be really awesome (example SKU):
// woocommerce-pdf-invoices/includes/templates/invoice/simple/micro/body.php:54 <!-- SKU --> <?php $show_sku = $this->template_options['bewpi_show_sku']; <?php if ( apply_filters('bewpi_order_show_sku', $show_sku, $this->order ) { ?> <?php $columns_count++; ?> <th class="align-left"><?php _e( 'SKU', 'woocommerce-pdf-invoices' ); ?></th> <?php } ?> ... // woocommerce-pdf-invoices/includes/templates/invoice/simple/micro/body.php:122 <?php $show_sku = $this->template_options['bewpi_show_sku']; <?php if ( apply_filters('bewpi_order_item_show_sku', $show_sku, $item, $this->order) { ?> <td><?php echo ( $product && $product->get_sku() ) ? $product->get_sku() : '-'; ?></td> <?php } ?>
Thank you for considering this new feature.
Kind regards,
Mike
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Filter for Invoice Columns’ is closed to new replies.