Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

fix: send payment_received receipt after manual payment confirmation and email verification

Aperta
#2,055 12 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@superdav42 ci sta già lavorando.

Dal 28/10/2026.

  • #2064 di @superdav42 — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug origin:interactive status:in-review tier:standard

Goal

Send the payment_received system email (customer receipt and admin notice) in two cases that currently send nothing:

  1. A network admin confirms a pending manual payment.
  2. 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_received email went to the customer or the admin. Event log rows for this step were changed payment and changed membership only.
  • 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_received email was sent.
  • Both paths are unchanged since v2.17.2, so this is long-standing, not a regression.

How

  • payment_received fires only from Payment_Manager::handle_payment_success() (inc/managers/class-payment-manager.php:109-219), which listens to wu_gateway_payment_processed.
  • wu_gateway_payment_processed comes from Base_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:1074 and :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 a payment_received event 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.php
  • inc/managers/class-customer-manager.php
  • inc/managers/class-payment-manager.php
  • tests/WP_Ultimo/Managers/Payment_Manager_Test.php
  • tests/WP_Ultimo/Managers/Customer_Manager_Test.php

Verification

  • vendor/bin/phpunit --filter 'Payment_Manager_Test|Customer_Manager_Test'
  • vendor/bin/phpcs on 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

Lingua principale
PHP
Stelle
218
Fork
87
Merge medio
1g 2h
PR unite (30g)
109

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Ultimate-Multisite/ultimate-multisite

Tutte le issue di Ultimate-Multisite/ultimate-multisite

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.