• Resolved govsocialmedia

    (@govsocialmedia)


    Is there a way to mark invoices with PAID? Our customers are confused when they log into My Account and see an invoice not marked as paid. The WooCommerce PDF Invoice plugin has this feature as a watermark, but their plugin is also buggy. Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hi!
    You can do this with a filter (requires WooCommerce 2.5 or later):

    
    add_action( 'wpo_wcpdf_after_document_label', 'wpo_wcpdf_paid_label', 10, 2 );
    function wpo_wcpdf_paid_label($template_type, $order) {
        if ( $template_type == 'invoice' && $order->is_paid() ) {
            echo '<h1>PAID</h1>';
        }
    }
    

    Read this if you havent worked with filters/code snippets like that before: How to use filters

    Hope that helps!
    Ewout

    Hi Ewout,

    I was looking for exactly this solution, only with a little modification. Would it be possible to only add ‘Paid’ when the customer paid up front. So for all payment methods except for Bacs?
    It would save us a lot of double payments.

    Plugin Contributor Ewout

    (@pomegranate)

    It’s already checking that!
    $order->is_paid() looks at the order statuses WooCommerce counts as ‘paid’: Processing and Completed.
    BACS goes to “On Hold” until it’s paid.

    alternatively, to specifically exclude BACS regardless of status:

    
    add_action( 'wpo_wcpdf_after_document_label', 'wpo_wcpdf_paid_label', 10, 2 );
    function wpo_wcpdf_paid_label($template_type, $order) {
        if ( $template_type == 'invoice' && $order->is_paid() && $order->get_payment_method() != 'bacs' ) {
            echo '<h1>PAID</h1>';
        }
    }
    

    Ewout

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Paid Watermark’ is closed to new replies.