Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(account): call the correct method #2790

Merged
merged 1 commit into from
Mar 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions tests/Handlers/AccountTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ public function testGetAccountPageDefaultFree(): void

$req = new RequestContext([]);
$user = new User();
$user->setUserId(12345);
$user->setContactId(12345);
$req->setUser($user);

$client = $this->createMock(CPClient::class);
Expand Down Expand Up @@ -717,7 +717,7 @@ public function testGetAccountPageDefaultFreeCompanyNull(): void

$req = new RequestContext([]);
$user = new User();
$user->setUserId(12345);
$user->setContactId(12345);
$req->setUser($user);

$client = $this->createMock(CPClient::class);
Expand Down Expand Up @@ -750,7 +750,7 @@ public function testGetUpdatePaymentMethodAddressPage(): void
$user = new User();
$user->setPaidClient(true);
$user->setPaymentStatus('ACTIVE');
$user->setUserId(12345);
$user->setContactId(12345);
$req->setUser($user);

$client = $this->createMock(CPClient::class);
Expand Down
2 changes: 1 addition & 1 deletion www/src/Handlers/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ public static function getAccountPage(RequestContext $request_context, string $p
$is_verified = $request_context->getUser()->isVerified();
$is_pending = $request_context->getUser()->isPendingCancelation();
$is_wpt_enterprise = $request_context->getUser()->isWptEnterpriseClient();
$contact_id = $request_context->getUser()->getUserId();
$contact_id = $request_context->getUser()->getContactId();
$remaining_runs = $request_context->getUser()->getRemainingRuns();
// See NOTE1
if (isset($_SESSION['new-run-count'])) {
Expand Down