• Resolved rana.irfan202

    (@ranairfan202)


    hi,
    we want to show bank details in invoice when customer buy with bacs payment method, it will be good if we can bank details as order confirmation page shows. Please let us know if there is any way or workaround ?

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

    (@kluver)

    Hi @ranairfan202,

    You can add additional text to your invoice when the payment method is ‘BACS’ with the following code snippet:

    add_action( 'wpo_wcpdf_after_order_details', 'wpo_wcpdf_add_bank_info', 10, 2 );
    function wpo_wcpdf_add_bank_info ( $template_type, $order ) {
    	if ( $template_type == 'invoice' ) {
    		$payment_method = $order->get_payment_method();
    		if ( $payment_method == 'bacs' ) {
    			?>
    			<div class="bank-info">
    				<p>Your bank info here.</p>
    			</div>
    			<?php
    		}
    	}
    }

    This code snippet should be added to the functions.php of your child theme or with a plugin like Code Snippets. If you haven’t worked with functions.php or code snippets before please read this: How to use filters

Viewing 1 replies (of 1 total)
  • The topic ‘Bank Details missing on Invoice’ is closed to new replies.