Support » Plugin: PDF Invoices & Packing Slips for WooCommerce » payment method
payment method
-
your plugin looks great but the payment method missing from packing slip
-
i find solution using the invoice but now i folow this article https://wordpress.org/support/topic/to-change-the-name-of-the-invoice-file/ to change the invoice text to order but this option not working. i added to function.php but the text Invoice remaining. i also clear caching and use new browser.
2. there is any way to reset the invoices already generated? i change the template and the invoices already opened keep the oldone. Thnaks
Hey @dblii,
Thanks for the compliment! Thanks for being a fan. 🙂
You can display the payment method on the packing slip with the following code snippet:
add_action( 'wpo_wcpdf_after_order_data', 'wpo_wcpdf_custom_text', 10, 2 ); function wpo_wcpdf_custom_text ($template_type, $order) { // check the template type if ( $template_type == 'packing-slip') { $payment_method = $order->get_payment_method(); ?> <tr class="inserted-row"> <th class="inserted-payment-method-label">Payment Method: </th> <td class="inserted-payment-method-value"> <?php echo ucfirst( $payment_method ) ?> </td> </tr> <?php //re-open the PHP tag (good practice) } }
If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: https://docs.wpovernight.com/general/how-to-use-filters/
I use the invoice there is any way to rename it please read my reply above
Hello @dblii,
If you’re referring to the file name (e.g.
invoice-123.pdf
) when you say “change the invoice text”, please see Custom PDF filenamesIf you’re referring to the document title, see Change the document title.
Alternatively, with the Professional extension you can do this directly from the plugin settings:
Hope it helps.
thanks @yordansoares you are right i talk about document title i changed and your solution work perfectly.
1. there is any way to remove this: https://prntscr.com/10bukad
2. if i generate one time an invoice the keep the first click i made some changes in template i added footer and Shop Address in section Pdf invoices –> General but this information in the invoices already generated not showing. there is any way to regenerate or reset?- Just go to WooCommerce > PDF Invoices > Documents > Invoice > Display invoice number and select No.
- Yes, you can update the invoice, just clicking on the sync icon within the PDF Invoice data panel:
thanks a lot
We’re pleased to help!
If you have a couple of minutes, we’d be very grateful if you could leave us a review.
Thanks in advance!
any idea what i must put here to get order number in pdf?
https://prnt.sc/10cb086any feedback ?
Hello @dblii,
Try to replace the line :37 for this one:
$filename = $name . '-' . $document->order_id . '-' . $suffix . '.pdf';
Let me know if it works! 😉
- The topic ‘payment method’ is closed to new replies.