Home / Admin / Show Invoice for Pending
Duplicate Snippet

Embed Snippet on Your Site

Show Invoice for Pending

Makes PDF Invoices available for pending payments

Code Preview
php
<?php
function pw_edd_pdf_invoices_for_pending( $show_invoice, $payment_id ) {
	
	$payment = get_post( $payment_id );
	$status = edd_get_payment_status( $payment );
	
    if( 'pending' === $status ) {
            $show_invoice = true;
    }
	
    return $show_invoice;
}
    
add_filter( 'eddpdfi_is_invoice_link_allowed', 'pw_edd_pdf_invoices_for_pending', 10, 2 );

Comments

Add a Comment