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

    (@pomegranate)

    Technically this is possible, but it requires a small code snippet to do this.

    
    add_filter( 'wpo_wcpdf_document_is_allowed', 'wpo_wcpdf_prevent_invoices', 99, 2 );
    function wpo_wcpdf_prevent_invoices( $is_allowed, $document ) {
    	if ( $document->get_type() == 'invoice' && !empty($document->order) && $document->order->get_payment_method() != 'bacs' ) {
    		$is_allowed = false;
    	}
    	return $is_allowed;
    }
    

    If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters

    Thread Starter danna556

    (@danna556)

    Thank u ewout, resolved ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘payment methods’ is closed to new replies.