Skip to content

Fix "revenue per visit" calculation #21555

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

Merged
merged 3 commits into from
Nov 17, 2023
Merged

Fix "revenue per visit" calculation #21555

merged 3 commits into from
Nov 17, 2023

Conversation

mneudert
Copy link
Member

@mneudert mneudert commented Nov 16, 2023

Description:

PHP 8.x changed how integers and strings are converted. This broke a check for 0 == 'ecommerceOrder', resulting in the "revenue per visit" changing values by not ignoring "ecommerce orders revenue" anymore:

However the code previously intended to include the revenue, so it should be fixed to behave properly on PHP 7.x and reflect the intent of "total revenue".

Should be backported to 4.x.

Review

@mneudert mneudert force-pushed the fix-revenue-per-visit branch from 31b3cfa to 551da52 Compare November 16, 2023 17:52
@mneudert mneudert added Bug For errors / faults / flaws / inconsistencies etc. Needs Review PRs that need a code review labels Nov 16, 2023
@mneudert mneudert added this to the 5.0.0 milestone Nov 16, 2023
@mneudert mneudert marked this pull request as ready for review November 16, 2023 18:02
@mneudert mneudert requested a review from a team November 16, 2023 18:02
@mneudert mneudert changed the title Fix "revenue per visit" calculation for PHP 8.x Fix "revenue per visit" calculation Nov 17, 2023
@mneudert mneudert force-pushed the fix-revenue-per-visit branch from 551da52 to cadce67 Compare November 17, 2023 10:23
Copy link
Member

@sgiehl sgiehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes are looking good to me now. Let's see if related tests are passing. If so this is good to merge

@mneudert mneudert merged commit 98ffea5 into 5.x-dev Nov 17, 2023
@mneudert mneudert deleted the fix-revenue-per-visit branch November 17, 2023 12:05
@mneudert mneudert mentioned this pull request Nov 17, 2023
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Needs Review PRs that need a code review
Development

Successfully merging this pull request may close these issues.

3 participants