Support » Plugin: WooCommerce PDF Invoices » Different invoice date and order date: perhaps timezone issue?

  • I have the following code in my custom template:

    printf( __( 'Receipt Number: %s', 'woocommerce-pdf-invoices' ), $invoice->get_formatted_number() );
    			printf( '<br />' );
    			printf( __( 'Receipt Date: %s', 'woocommerce-pdf-invoices' ), $invoice->get_formatted_invoice_date() );
    			printf( '<br /><br />' );
    			printf( __( 'Order Number: %s', 'woocommerce-pdf-invoices' ), $order->get_order_number() );
    			printf( '<br />' );
    			printf( __( 'Order Date: %s', 'woocommerce-pdf-invoices' ), $invoice->get_formatted_order_date() );

    The site I’m testing it on has the US timezone and I’m located on a different timezone.

    Based on the above code, I received this in the pdf:

    Receipt Number: 005-2019
    Receipt Date: May 6, 2019
    Order Number: 34537
    Order Date: May 7, 2019

    On the WooCommerce order page, I can only see May 6. Is there a way to resolve this? It doesn’t make sense to have receipt date earlier than the order date.


  • You must be logged in to reply to this topic.