• Hello,

    is it possible to add an additional text to the invoice when a specific payment method was used?
    If so, is this feature integrated only in the premium version?

    • This topic was modified 4 years, 3 months ago by r00flr00fl.
Viewing 1 replies (of 1 total)
  • Plugin Contributor alexmigf

    (@alexmigf)

    Hello @r00flr00fl

    You should be able to do that using an action hook from this table: PDF template action hooks

    And add the code snippet below inside it:

    if ( !empty($order) && $document->get_type() == 'invoice' ) {
    	$payment_method_title = is_callable( array( $order,'get_payment_method' ) ) ? $order->get_payment_method() : '';
    	if ( stripos( $payment_method_title, 'cod' ) !== false ) { // cash on delivery payment example
    		// do your stuff
    	}
    }

    Hope that helps!

Viewing 1 replies (of 1 total)
  • The topic ‘Add text for specific payment methods?’ is closed to new replies.