Plugin Contributor
Mohamad
(@mohamadntr)
Hi @newtlabs,
Are you using a custom template? If so, then you need to update those methods that you used in your custom template to stop the deprecation logs.
Best regards
Hi, after changing invoice_number to number and invoice_date to date the pdfs stopped working and returned a fatal error:
Fatal error: Too few arguments to function WPO\WC\PDF_Invoices\Documents\Order_Document::number(), 0 passed in /themes/ico/woocommerce/pdf/iCO/invoice.php on line 119 and exactly 1 expected.
This is how the code is being used in the custom template:
<?php if ( isset($this->settings['display_number']) ) { ?>
<tr class="invoice-number">
<th><?php echo $this->get_number_title(); ?></th>
<td><?php $this->invoice_number(); ?></td>
</tr>
<?php } ?>
<?php if ( isset($this->settings['display_date']) ) { ?>
<tr class="invoice-date">
<th><?php echo $this->get_date_title(); ?></th>
<td><?php $this->invoice_date(); ?></td>
</tr>
<?php } ?>
Please can you confirm what needs changing so we are not using deprecations?
Plugin Contributor
Mohamad
(@mohamadntr)
Hi @newtlabs,
Please try this code:
<?php $this->number( $this->get_type() ); ?>
Do the same for the date:
<?php $this->date( $this->get_type() ); ?>
Best regards
that seems to work, thanks.