brianhenryie/bh-wp-order-email-reconcile

Mark orders as paid by reconciling payment-confirmation emails. WooCommerce supported; designed to be extensible to other order sources (e.g. GiveWP).

Maintainers

Package info

github.com/BrianHenryIE/bh-wp-order-email-reconcile

Type:wordpress-library

pkg:composer/brianhenryie/bh-wp-order-email-reconcile

Transparency log

Statistics

Installs: 143

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 6

dev-master 2026-08-22 07:47 UTC

This package is auto-updated.

Last update: 2026-08-24 00:31:20 UTC


README

PHPCS WPCS

BH WP Order Email Reconcile

Mark orders as paid by reconciling payment-confirmation emails against unpaid orders.

Emails are fetched and stored by BH WP Mailboxes. When new emails arrive, this library parses them and matches them to unpaid orders by order id (from the payment note), customer payment id (e.g. Venmo/$CashTag), email address, then name.

The core is integration-agnostic: it deals only with Unpaid_Order objects supplied by an Unpaid_Orders_Provider_Interface. WooCommerce is supported today; GiveWP is scaffolded as a second integration. See ARCHITECTURE.md and PLAN.md.

Usage

$settings = new My_Reconcile_Settings(); // implements Email_Reconcile_Settings_Interface
$logger   = Logger::instance( $settings );
BH_WP_Order_Email_Reconcile::make( $settings, $logger );

Call make() when your plugin file loads. It only registers hooks: the integrations (WooCommerce, GiveWP) are checked for availability at query time, so it does not matter whether those plugins have loaded yet. Do not defer instantiation past plugins_loaded — the cron jobs are (un)scheduled from plugins_loaded callbacks, which would then never run.

Email accounts (server, credentials, filters) are configured through the BH WP Mailboxes API; this library never stores credentials.

Development

See CONTRIBUTING.md.