$is_pay_later is TRUE in contribution receipt even if payment is completed.
To replicate -
- Create a pay later payment in civicrm using a front end contribution page.
- Note that the email received has
Invoice
in the subject. This text is set when you choose to pay viapay later
. - Complete the payment using
completetransaction
API (or use API explorer from UI). This is used by payment processors, xero, etc to complete the payment in civicrm on receiving the confirmation.
$result = civicrm_api3('Contribution', 'completetransaction', [
'id' => <contribution_id>,
]);
- The email confirmation still has
Invoice
in the subject.