Skip to content

fuzionnz/xeropendingfilter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xero Pending Filter

This extension enhances the CiviXero integration by filtering which "Pending" contributions are pushed to Xero. It distinguishes between "Pending (Pay Later)" contributions and "Pending (Incomplete Transaction)" contributions, ensuring only genuine Pay Later invoices are synchronized with Xero.

When users choose to pay later at checkout, these contributions should be pushed to Xero as invoices. However, when online payment transactions fail or are incomplete, these should NOT be pushed to Xero. This extension implements that logic by checking the is_pay_later flag on contributions before allowing them to sync.

This is an extension for CiviCRM, licensed under AGPL-3.0.

Requirements

Installation

  1. Download or clone this extension to your CiviCRM extensions directory
  2. Navigate to Administer → System Settings → Extensions
  3. Find "Xero Pending Filter" and click Install
  4. Clear CiviCRM caches

How It Works

The extension implements the hook_civicrm_accountPushAlterMapped() hook to inspect each contribution before it's pushed to Xero. It checks:

  1. Is the contribution status "Pending"? (contribution_status_id = 2)
  2. Is the is_pay_later flag set?
    • YES (is_pay_later = 1): This is a legitimate Pay Later contribution → Allow push to Xero
    • NO (is_pay_later = 0): This is an incomplete transaction → Block push to Xero

Support

For issues, questions, or contributions, please file an issue in the extension repository.

About

Prevent pushing of Pending (Incomplete Transaction) contributions to Xero.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages