Viewing 1 replies (of 1 total)
  • Plugin Author David Jensen

    (@dkjensen)

    @admt2018 Yes however it would require some coding on your end. I’m assuming you want to alter the filename of the PDF generated, if so you would use the following filter:

    function child_theme_cart_pdf_filename( $filename ) {
        return 'newfilename.pdf';
    }
    add_filter( 'wc_cart_pdf_filename', 'child_theme_cart_pdf_filename' );

    However you would probably want to add an option to the WordPress database that increments whenever a PDF is generated, using the update_option function. At that point you could then add the text to the PDF itself by copying the cart-table.php file in your child theme:

    Copy the PDF template from the plugin folder wc-cart-pdf/templates/cart-table.php into your child theme folder child-theme/woocommerce/wc-cart-pdf/cart-table.php.

    Let me know if this doesn’t make sense and I can try and explain better

Viewing 1 replies (of 1 total)

The topic ‘Add Document Name in pdf’ is closed to new replies.