Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor dwpriv

    (@dwpriv)

    You can get the updated template files from the updated plugin itself.

    You can also change code manually with the below guide:

    To update your template, follow the instructions below in order. Keeping a backup of your template is good in case anything goes wrong.

    Update html-document-wrapper.php file: Replace the entire code with the one you can find here.

    Update Template Files: For each template file (invoice.php, packing-slips.php), perform the following:

    1. Add this line at the top of each template file: <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
    2. Replace or remove any occurrences of the following if you encounter them. Note that the spacing around parentheses may vary in your files, so search for different queries to ensure you find them.
      1. Replace 'wpo_wcpdf' with 'woocommerce-pdf-invoices-packing-slips'. (Please note that It should be exactly 'wpo_wcpdf', with one quotation around.)
      2. Remove the global variable $wpo_wcpdf you can find in the beginning lines of files.
      3. Replace $wpo_wcpdf with $this.
      4. Replace $this->export->order with $this->order.
      5. Replace $this->export->template_type with $this->get_type().
      6. Replace $this->settings->template_settings with $this->settings.
      7. Replace 'invoice_email' with 'display_email'.
      8. Replace 'invoice_phone' with 'display_phone'.
      9. Replace 'packing_slip_email' with 'display_email'.
      10. Replace 'packing_slip_phone' with 'display_phone'.
      11. Replace apply_filters( 'wpo_wcpdf_item_row_class', $item_id, $this->get_type(), $this->order, $item_id ); with apply_filters( 'wpo_wcpdf_item_row_class', 'item-'.$item_id, $this->get_type(), $this->order, $item_id );
      12. Replace isset($this['invoice_shipping_address']) && $this->ships_to_different_address() with $this->show_shipping_address().
      13. Replace isset($this['packing_slip_billing_address']) && $this->ships_to_different_address() with $this->show_billing_address().
    Thread Starter ryter23

    (@ryter23)

    Perfect thanks that worked! ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wpo_wcpdf not existing’ is closed to new replies.