-
Notifications
You must be signed in to change notification settings - Fork 69
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 deprecated strtolower on order received page #8387
Fix deprecated strtolower on order received page #8387
Conversation
Co-authored-by: deepakpathania <68396823+deepakpathania@users.noreply.github.com>
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
@jessepearson I'm unhappy with the implementation here (querying the DB directly, getting the ID from the URL is hacky, checking which page we're on via backtrace seems hacky, and there's only one place where we try to re-initialize the order currency) but wanted to get your 👀 on this to see what you think of the overall approach? It fixes the issue on both the order received page as well as viewing the order details under the My Account → Orders page. But it all just feels a bit hacky. Not really sure what else to do though. We basically need the order currency during the There's some more context in my comments on the issue #8232 but this is the gist of it. Would love to pick your brain on this a bit. |
Size Change: 0 B Total Size: 1.19 MB ℹ️ View Unchanged
|
I feel like what you're doing is similar to what I do agree that it seems hacky to get the order number from the URL, but we have to do that when it's not available, unfortunately. You mentioned that the Dealing with these issues isn't easy because you can spend a couple days trying to solve the issue with different approaches and end up with like 4 lines of code to show for it. |
…h of logic to each filter
That was something I hadn't considered! I looked into this some more and you can take a look at the current approach. I think it's much better than the previous fix. Thanks for pointing me to this, I think that really helped improve the fix! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good and test well! No deprecated warning was noted on PHP 8.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 💯
Co-authored-by: Eric Jinks <3147296+Jinksi@users.noreply.github.com> Co-authored-by: Miguel Gasca <miguel.gasca@automattic.com> Co-authored-by: deepakpathania <68396823+deepakpathania@users.noreply.github.com>
Fixes #8232
Changes proposed in this Pull Request
FrontendCurrencies
class by the time the decimal point formatting function is called.Testing instructions
npm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge