Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
5e760d2
feat(my-account): scaffold v2 prototype demo gate behind ?v2-demo flag
thomasguillot Apr 28, 2026
8862c17
docs(my-account): clarify Phase 1 scope in comment and brief §4
thomasguillot Apr 28, 2026
dd04290
docs(my-account): record Phase 1 sync decisions in devlog
thomasguillot Apr 28, 2026
71786f3
feat(my-account): build v2 prototype newsletters list (Phase 2)
thomasguillot Apr 28, 2026
1f7c8a3
fix(my-account): address Copilot review on Phase 2
thomasguillot Apr 28, 2026
c577d09
feat(my-account): build v2 prototype donations (Phase 3)
thomasguillot Apr 28, 2026
17cbb9e
fix(my-account): address Copilot review on Phase 3
thomasguillot Apr 28, 2026
e46dc9c
feat(my-account): build v2 prototype subscriptions (Phase 4) (#4680)
thomasguillot Apr 28, 2026
210ca51
feat(my-account): build v2 prototype modals (Phase 5) (#4681)
thomasguillot Apr 28, 2026
f0b80ba
feat(my-account): build v2 prototype payment methods (Phase 6) (#4682)
thomasguillot Apr 28, 2026
4d84ba1
feat(my-account): build v2 prototype scenarios + polish (Phase 7) (#4…
thomasguillot Apr 28, 2026
b124b66
docs(my-account): add v2 prototype guide (Phase 8) (#4684)
thomasguillot Apr 28, 2026
055638a
feat(my-account): polish v2 newsletters list
thomasguillot Apr 30, 2026
2366cd0
feat(my-account): add v2 prototype homepage overlay
thomasguillot Apr 30, 2026
de41b18
fix(my-account): accept blog index for v2 homepage overlay gate
thomasguillot Apr 30, 2026
4a8ba66
fix(my-account): append v2-demo flag to homepage overlay menu links
thomasguillot Apr 30, 2026
4fcdeab
feat(my-account): preserve v2 demo flag on back-to-homepage link
thomasguillot Apr 30, 2026
3b36903
refactor(my-account): unify v2 demo flag to my-account-v2-demo
thomasguillot Apr 30, 2026
afeace2
refactor(my-account): rename v2-demo to my-account-v2-demo throughout
thomasguillot Apr 30, 2026
24762ab
feat(my-account): build v2 prototype account settings (Phase 9) (#4688)
thomasguillot Apr 30, 2026
9074a12
fix(my-account): v2 demo polish pass (#4689)
thomasguillot Apr 30, 2026
4259797
feat(my-account): rebuild v2 payment information page + modals (#4690)
thomasguillot Apr 30, 2026
037db9a
fix(my-account): v2 demo donation detail rebuild (#4691)
thomasguillot Apr 30, 2026
5100d84
fix(my-account): v2 demo subscriptions polish + expired variant (#4692)
thomasguillot Apr 30, 2026
d4edf92
feat(my-account): add v2 prototype Reader Account Customization admin…
thomasguillot Apr 30, 2026
569ec4a
docs(my-account): sweep brief + guide for Phase 9, Phase 10 + post-Ph…
thomasguillot Apr 30, 2026
09343c0
fix(reader-revenue): handle PayPal Payments 4.x container service IDs
miguelpeixe Apr 30, 2026
9c5ad1c
fix(my-account): v2 demo prototype review fixes
thomasguillot Apr 30, 2026
124f749
fix(my-account): guard v2 demo newsletters redirect on real endpoint
thomasguillot Apr 30, 2026
17d0259
docs(my-account): refresh v2 prototype guide stale references
thomasguillot Apr 30, 2026
b8b4ddf
chore: preparing demo
leogermani May 1, 2026
5a2969b
chore: make email editable
leogermani May 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
758 changes: 758 additions & 0 deletions docs/my-account-v2-prototype-brief.md

Large diffs are not rendered by default.

603 changes: 603 additions & 0 deletions docs/my-account-v2-prototype-devlog.md

Large diffs are not rendered by default.

296 changes: 296 additions & 0 deletions docs/my-account-v2-prototype-guide.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -251,20 +251,40 @@ public function gateway_data( $gateway_slug ) {
$test_mode = $gateway && 'yes' === $gateway->get_option( 'test_mode', false ) ? true : false;

// PayPal gateway doesn't provide helper functions, so we need to use its internal API.
// Service IDs vary across plugin versions: `onboarding.environment` (≤2.9.6) was
// renamed to `settings.environment` in 3.0.0, and `onboarding.state` was removed in
// 4.0.0. Probe with has() before get() and wrap the whole block to keep future
// container changes from taking the wizard down.
if ( 'ppcp-gateway' === $gateway_slug && method_exists( 'WooCommerce\PayPalCommerce\PPCP', 'container' ) ) {
$paypal = \WooCommerce\PayPalCommerce\PPCP::container();
if ( $paypal ) {
try {
$env = $paypal->get( 'onboarding.environment' ); // woocommerce-paypal-payments@2.9.6.
$env = null;
if ( $paypal->has( 'settings.environment' ) ) {
$env = $paypal->get( 'settings.environment' );
} elseif ( $paypal->has( 'onboarding.environment' ) ) {
$env = $paypal->get( 'onboarding.environment' );
}
if ( $env && $env->current_environment_is( $env::SANDBOX ) ) {
$test_mode = true;
}
if ( $paypal->has( 'onboarding.state' ) ) {
$state = $paypal->get( 'onboarding.state' );
if ( $state && $state::STATE_ONBOARDED <= $state->current_state() ) {
$is_connected = true;
}
}
} catch ( \Throwable $th ) {
$env = $paypal->get( 'settings.environment' ); // woocommerce-paypal-payments@3.0.0.
}
if ( $env && $env->current_environment_is( $env::SANDBOX ) ) {
$test_mode = true;
}
$state = $paypal->get( 'onboarding.state' );
if ( $state && $state::STATE_ONBOARDED <= $state->current_state() ) {
$is_connected = true;
// Container shape changed unexpectedly; degrade to gateway-derived values
// so the wizard keeps rendering, and surface the cause for debugging.
error_log( // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
sprintf(
'[Newspack] PayPal container access failed in gateway_data(): %s in %s on line %d',
$th->getMessage(),
$th->getFile(),
$th->getLine()
)
);
}
}
}
Expand Down
Loading
Loading