• Resolved Rune Rasmussen

    (@syntaxerrorno)


    Hi,

    We wanted to display a download link for the invoices on the order detail page, so we added this snippet:

    add_action( 'woocommerce_order_details_before_order_table', function() {
        echo do_shortcode('[wcpdf_download_invoice]');
    });

    That kind of works, but it displays even if the invoice hasn’t been generated yet, which of course is bad UI. Beyond that, it also shows up on the ‘thank you’ page.

    So wondering if it’s a bug that it displays even when the invoice hasn’t been generated yet, or if it requires some extra code for the snippet?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @syntaxerrorno,

    Sorry for the late reply!

    I tested the shortcode in a staging site and confirmed that it indeed behave as you described. We just added a fix for this (source), that will be available in the next release!

    However, I also prepared a beta release for you, so you don’t need to wait: https://we.tl/t-zGY2IGa8QV

    Thanks for reporting this issue!

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @syntaxerrorno,

    I’m pleased to inform you that the improvement that makes the shortcode output only if there is an invoice (or the user can generate it), is now available in version 3.0.0 that we just launched a few minutes ago. You can see the full changelog here. That means you no longer need to install the beta version I left above (if you haven’t already done so), but can update directly with this version.

    Thread Starter Rune Rasmussen

    (@syntaxerrorno)

    Thanks, seems to works nicely now.

    *Had some summer vacation, thus the late reply. ??

    Plugin Contributor Yordan Soares

    (@yordansoares)

    No problem, @syntaxerrorno: I hope you enjoyed your vacation!

    If you don’t mind and have the time, do you think you could leave us a review?

    Thanks in advance and all the best with your store!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Download WCPDF Invoice on Order Details’ is closed to new replies.