fix(checkout): prevent epoch membership expiration - #1692
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
🔨 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! Login credentials: |
Summary
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 skipvendor/bin/phpcs inc/checkout/class-checkout.php tests/WP_Ultimo/Checkout/Checkout_Test.phpvendor/bin/phpstan analyse inc/checkout/class-checkout.php tests/WP_Ultimo/Checkout/Checkout_Test.php --no-progressgit diff --checkaidevops.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.