fix: send payment_received receipt after manual payment confirmation and email verification
メンテナーはふだん 1 日以内に返信
評価
この issue はまだ評価されていません。
説明
Goal
Send the payment_received system email (customer receipt and admin notice) in two cases that currently send nothing:
- A network admin confirms a pending manual payment.
- A free signup becomes active after its customer verifies their email address.
Evidence
Release 2.18.0 smoke test on a fresh dev network at origin/main c8b5ffe8 (2026-10-28), with mail captured by Mailpit:
- Manual payment: Premium checkout with the Manual gateway left payment #1 and membership #1 pending, as expected. An admin then set the payment to Completed with "Activate membership?" on. The membership became active and the site was published, and "Your site is ready!" was sent. No
payment_receivedemail went to the customer or the admin. Event log rows for this step werechanged paymentandchanged membershiponly. - Free signup with email verification: the thank-you page says "a receipt for your purchase has been emailed to you". After the customer followed the verification link, the site went READY and "Your site is ready!" was sent. No "Your free membership is active" /
payment_receivedemail was sent. - Both paths are unchanged since v2.17.2, so this is long-standing, not a regression.
How
payment_receivedfires only fromPayment_Manager::handle_payment_success()(inc/managers/class-payment-manager.php:109-219), which listens towu_gateway_payment_processed.wu_gateway_payment_processedcomes fromBase_Gateway::trigger_payment_processed()(inc/gateways/class-base-gateway.php:901). The checkout calls it for free/trial orders only when email verification is not pending (inc/checkout/class-checkout.php:1074and:1108). Gateways call it on gateway-confirmed payments.- Manual confirmation path:
Payment_Edit_Admin_Page::handle_save()(inc/admin-pages/class-payment-edit-admin-page.php:1458+) activates the membership but never triggers payment processed. - Verification path:
Customer_Manager::maybe_verify_email_address()/transition_customer_email_verification()(inc/managers/class-customer-manager.php:183,:245) publish the deferred free signup but never trigger payment processed. - Trigger it once in each path, with the payment's gateway (
wu_get_gateway($payment->get_gateway())) or the manual/free gateway. Guard against duplicate events, for example by checking whether apayment_receivedevent already exists for the payment, so a repeated save or verification can't send twice.
Files Scope
inc/admin-pages/class-payment-edit-admin-page.phpinc/managers/class-customer-manager.phpinc/managers/class-payment-manager.phptests/WP_Ultimo/Managers/Payment_Manager_Test.phptests/WP_Ultimo/Managers/Customer_Manager_Test.php
Verification
vendor/bin/phpunit --filter 'Payment_Manager_Test|Customer_Manager_Test'vendor/bin/phpcson the changed files.- Dev site with Mailpit: (1) a manual Premium checkout, then admin Completed + "Activate membership?", sends exactly one customer receipt and one admin notice; (2) a free signup with verification sends "Your free membership is active" once, after verification; (3) re-saving the completed payment sends nothing further.
aidevops.sh v3.39.49 plugin for OpenCode
- 主要言語
- PHP
- スター
- 218
- フォーク
- 87
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 109
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Ultimate-Multisite/ultimate-multisite のほかの issue
-
perf: lazy-load the top My Sites toolbar and defer initial site-list hydration再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンenhancement origin:worker priority:medium source:conflict-feedback status:available tier:standard
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
Ultimate-Multisite/ultimate-multisite#2015 · コメント 189 件 ·
メンテナーはふだん 1 日以内に返信
-
auto-dispatch needs-investigation origin:worker security status:available tier:standard type:bug
難易度 3/5 半日 初心者へのやさしさ 30/100
Ultimate-Multisite/ultimate-multisite#1930 ·
メンテナーはふだん 1 日以内に返信
-
hold-for-review no-auto-dispatch origin:interactive status:available type:bug
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
Ultimate-Multisite/ultimate-multisite#1892 ·
メンテナーはふだん 1 日以内に返信
-
auto-dispatch hold-for-review origin:worker review-followup source:review-scanner status:available tier:standard
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
Ultimate-Multisite/ultimate-multisite#1867 · コメント 7 件 ·
メンテナーはふだん 1 日以内に返信
-
auto-dispatch needs-investigation origin:worker security status:available tier:standard type:bug
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
Ultimate-Multisite/ultimate-multisite#1753 ·
メンテナーはふだん 1 日以内に返信
Ultimate-Multisite/ultimate-multisite の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
PrestaShopCorp/ps_accounts#677 ·
-
bug webbackend
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
DOMjudge/domjudge#3886 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
opensourcepos/opensourcepos#4794 ·
メンテナーはふだん 1 日以内に返信
-
repo:cms
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
craftcms/cms#20235 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信