• Hello team,

    A month ago I changed the invoice.php file to make my own template, but after an update, all of the custom code was disappeared.

    Now I finished again the customization on the invoice.php file but it gonna be changed when the new update will comes up.

    How to keep the invoice.php file untouched?

    The theme doesn’t have child theme. Do I need to create a child-theme?

    Each help is appreciated.

    Thank you ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter kasimrixa

    (@kasimrixa)

    Following up.

    I create the child-theme also I copied all the files

    from
    wp-content/plugins/woocommerce-pdf-invoices-packing-slips/templates/Simple/

    to
    wp-content/themes/denso-child/woocommerce/pdf/invoices/

    Is that enough? Because I deleted the invoice from wp-content/plugins/woocommerce-pdf-invoices-packing-slips/templates/Simple/invoice.php to check if the wp-content/themes/denso-child/woocommerce/pdf/invoices/invoice.php works but nothing.

    Each help is appreciated.

    Thank you ??

    Plugin Contributor kluver

    (@kluver)

    Hi @kasimrixa,

    Yes, for the changes in your template to remain there when you update your theme or the plugin you will need a child theme and create a custom template in that child theme. It looks like you’ve achieved that already, but here is some documentation on the subject: Creating a custom template

    After creating the child theme and adding the custom template to it, make sure you’ve activated your Denso child theme (Appearance > Themes). And after activating your child theme you should see an extra template option in the PDF Invoices plugin (WooCommerce > PDF Invoices > General > Choose a template). The name of the template in this case is ‘invoices’ because this is what you’ve named the folder in your child theme.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Keep custom Invoice.php’ is closed to new replies.