Support » Plugin: NIF (Num. de Contribuinte Portugu√™s) for WooCommerce » plugin "WooCommerce PDF Invoices & Packing Slips" compatibility

  • Resolved CajonTitoo

    (@cajontitoo)


    Hello ,

    with this plugin for pdf invoice:
    /**
    * Plugin Name: WooCommerce PDF Invoices & Packing Slips
    * Plugin URI: http://www.wpovernight.com
    * Description: Create, print & email PDF invoices & packing slips for WooCommerce orders.
    * Version: 1.5.24
    * Author: Ewout Fernhout
    * Author URI: http://www.wpovernight.com
    * License: GPLv2 or later
    * License URI: http://www.opensource.org/licenses/gpl-license.php
    * Text Domain: wpo_wcpdf
    */

    i put this code in my ‘invoice.php’ and ‘packing-slip.php’ files
    (localised in wordpress\wp-content\themes\”My_theme”\woocommerce\pdf\”my_template” directory)

    <?php if ($billing_country=='PT') { ?>
     <div class="billing-nif"><?php $wpo_wcpdf->custom_field('_billing_nif', __('NIF / NIPC', 'woocommerce_nif'),  true); ?></div>
    <?php } ?>

    after billing_phone field .
    this work nice but

    do you think is a good idea or it’s better to make a filter in your plugins ?

    thank

    https://wordpress.org/plugins/nif-num-de-contribuinte-portugues-for-woocommerce/

Viewing 1 replies (of 1 total)
  • Hi there,

    A filter on our plugin wouldn’t allow us to insert the NIF into the PDF Invoice.

    We can use a filter on “WooCommerce PDF Invoices & Packing Slips” if it exists, but this is quite a specific implementation.

    The way you’ve done it, it’s what makes more sense, no doubt about it.

Viewing 1 replies (of 1 total)
  • The topic ‘plugin "WooCommerce PDF Invoices & Packing Slips" compatibility’ is closed to new replies.