Skip to content

fix(checkout): prevent epoch membership expiration - #1692

Draft
superdav42 wants to merge 1 commit into
mainfrom
feature/auto-20260803-114025
Draft

fix(checkout): prevent epoch membership expiration#1692
superdav42 wants to merge 1 commit into
mainfrom
feature/auto-20260803-114025

Conversation

@superdav42

Copy link
Copy Markdown
Collaborator

Summary

  • use the calculated next charge date when recurring billing starts immediately
  • preserve null expiration dates for lifetime memberships
  • cover persisted, email-placeholder, and customer-facing expiration output

Root cause

Recurring carts without trials report a billing start timestamp of 0. Formatting that value directly persisted a January 1970 membership expiration, which then propagated to email event payloads and customer views.

Verification

  • vendor/bin/phpunit --no-coverage --filter 'WP_Ultimo\\Checkout\\Checkout_Test' — 204 tests, 349 assertions, 1 skip
  • vendor/bin/phpcs inc/checkout/class-checkout.php tests/WP_Ultimo/Checkout/Checkout_Test.php
  • vendor/bin/phpstan analyse inc/checkout/class-checkout.php tests/WP_Ultimo/Checkout/Checkout_Test.php --no-progress
  • git diff --check

aidevops.sh v3.32.219 plugin for OpenCode v1.18.9 with gpt-5.6-sol spent 2h 16m and 440,196 tokens on this with the user in an interactive session.

@superdav42 superdav42 added the origin:interactive Created by interactive user session label Aug 3, 2026
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1c866d0d-50cc-4143-90b3-56d701f1d174

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

🔨 Build Complete - Ready for Testing!

📦 Download Build Artifact (Recommended)

Download the zip build, upload to WordPress and test:

🌐 Test in WordPress Playground (Very Experimental)

Click the link below to instantly test this PR in your browser - no installation needed!
Playground support for multisite is very limitied, hopefully it will get better in the future.

🚀 Launch in Playground

Login credentials: admin / password

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

origin:interactive Created by interactive user session

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant