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
Add totalValue filter #45170
Add totalValue filter #45170
Conversation
Test Results SummaryCommit SHA: 28c20ef
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
Hi @wavvves, Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
Hi @nielslange, I'm seeing some failing tests related to Totals that seem related. In the meantime I'll start reviewing the changes 👍🏼 |
Thanks for reviewing this PR, @wavvves. I've looked into the failing JS unit tests, and it turned out they were related to some CSS classes and HTML markup changes. I've addressed these issues and all tests are now passing. Would you mind reviewing this PR again? |
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.
Nice work @nielslange, tested out and everything seems to be working as expected!
Thanks for reviewing this PR again, and thanks for calling out the failing JS unit tests. Somehow, I missed them initially, thinking they would be failing due to another PR, while this PR was causing them to fail. 🙈 |
* Add totalValue filter * Add changefile(s) from automation for the following project(s): woocommerce-blocks * Remove nowrap to prevent text overflow * Start docs for ‘totalValue’ filter * Fix *.md lint issues * Ignore .md lint errors for now * Update code example and add screenshots * Fix failing JS unit tests --------- Co-authored-by: github-actions <github-actions@github.com>
Submission Review Guidelines:
Changes proposed in this Pull Request:
Closes #42004.
Closes #45172.
This PR adds the
totalValue
filter to wrap the total price on the Cart and Checkout blocks. This filter is needed for plugins such as Pre-Orders. It follows the same patterns of the following existing filters:cartItemPrice
subtotalPriceFormat
saleBadgePriceFormat
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
/wp-admin/edit.php?post_type=custom-css-js
and add the following code snippet:Important
Make sure to run the script in the footer as it requires other dependencies to load first.
Pay ... now
.Pay ... now
.<price/>
from the code snippet and repeat steps 4. and 5.Error: Returned value must include <price/>, you passed "Pay now"
is visible.Screenshots
Changelog entry
Significance
Type
Message
Add totalValue filter.
Comment