Support » Plugin: PDF Invoices & Packing Slips for WooCommerce » Paypal do not take the invoice number

  • Resolved agnostiker


    Hello together,

    I moved my website to another server. Now I have the problem, that paypal use my order number as invoice number. How can I change this, so that PayPal will get the correct created invoice number of the plugin?

    Many thanks in advanced.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Contributor alexmigf


    Hello @agnostiker

    This might be problematic because this requires the invoice to be created for each payment attempt (before the order is finalized).

    Anyway, if you would like to proceed at your own risk, because this is somewhat beyond what we can provide as free support, you could try this untested snippet:

    function woocommerce_paypal_args_invoice_number( $args, $order ) {
    	if ( $invoice = wcpdf_get_invoice( $order, true ) ) {
    		$args['invoice'] = $invoice->get_number()->get_formatted();
    	return $args;

    If you never worked with filters, please read this documentation: How to use filters

    Hope that helps!

Viewing 1 replies (of 1 total)
  • The topic ‘Paypal do not take the invoice number’ is closed to new replies.