• Resolved kronoswolf

    (@kronoswolf)


    Hi Ewout!

    You helped me once and it’s all working fine, but there’s one issue with the dates. I sell hosting plans, so the customer can purchase the first time and the dates are ok(Order Date and Due Date). After that, if I finish that order other day, I have to edit the invoice date before finish to match the order date, but no problem with that, and thanks to you I can also show the Payment Date/Completed Date. After that, I have to send monthly invoices from the backend with the status “Pending” and the customer can pay it on their account page, but when he pays the status changes to “Processing”(Ok) and it changes the order date(Problem). How can I get only the invoice date and display it? I’m customizing the templates of “my account” folder, and I want to show the invoice date instead of the order date, that’s possible?

    Thanks in advance!

    https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter kronoswolf

    (@kronoswolf)

    Edit:

    *but when he pays(on a different day)

    *How can I get only the invoice date and display it?(or make the order date always take the invoice date?)

    Plugin Contributor Ewout

    (@pomegranate)

    Hi! You can hide the order date in the invoice with CSS:

    .invoice .order-date {
    	display: none;
    }

    But I think that maybe you’re only referring to changing the date on the my account page, not to a date in the PDF?

    Showing the invoice date instead of the order date in the my account page is harder, also because not all orders have an invoice date. But if you’re fine with showing the order date until there’s an invoice date:

    <?php if (!empty($order->wcpdf_invoice_date)): ?>
    	<time datetime="<?php echo date( 'Y-m-d', strtotime( $order->wcpdf_invoice_date ) ); ?>" title="<?php echo esc_attr( strtotime( $order->wcpdf_invoice_date ) ); ?>"><?php echo date_i18n( get_option( 'date_format' ), strtotime( $order->wcpdf_invoice_date ) ); ?></time>
    <?php else: ?>
    	<time datetime="<?php echo date( 'Y-m-d', strtotime( $order->order_date ) ); ?>" title="<?php echo esc_attr( strtotime( $order->order_date ) ); ?>"><?php echo date_i18n( get_option( 'date_format' ), strtotime( $order->order_date ) ); ?></time>
    <?php endif ?>

    Hope that helps!
    Ewout

    Thread Starter kronoswolf

    (@kronoswolf)

    Ewout, what can I say… you are the man!
    Now everything is working 100% and I can get start on my business. I made a review of the plugin before but words and stars can’t say how much I’m thankful for your help and time.

    I’m still learning programming languages, mainly php, and all by myself with researching and practice. I hope to be useful too in the future.

    Again, thank you very much and success!

    Cheers

    Plugin Contributor Ewout

    (@pomegranate)

    You’re welcome! Nothing more rewarding than a happy user of our plugins 🙂

    Ewout

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Invoice Date and Order Date’ is closed to new replies.