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

Make shipping total in Cart/Checkout block order summaries show FREE if shipping price is 0 #47553

Merged
merged 7 commits into from
May 20, 2024

Conversation

opr
Copy link
Contributor

@opr opr commented May 16, 2024

Changes proposed in this Pull Request:

This PR will show the text 'FREE' in bold and capital letters in the order summary on the Cart and Checkout block.

It also adds a unit test to cover this, and fixes a TS issue with some earlier tests.

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

  1. Have at least two shipping options set up, one should be free shipping.
  2. Go to WooCommerce -> Settings -> Shipping -> Shipping Settings and ensure Enable the shipping calculator on the cart page is checked.
  3. Add an item to your cart and go to the Cart block.
  4. In the order summary, select the free shipping rate. The shipping price should now say 'FREE'.
image
  1. Change your shipping method to flat rate and ensure the correct price shows. It should not say 'FREE'.
  2. Go to the Checkout block and do the same, ensure the correct value shows for free and paid shipping.

Changelog entry

  • Automatically create a changelog entry from the details below.

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

Comment

@opr opr added focus: cart Issues related to the cart. focus: checkout Issues related to checkout page. plugin: woocommerce Issues related to the WooCommerce Core plugin. team: Rubik Store API checkout endpoints, Mini-Cart, Cart and Checkout related issues block: cart Issues related to the cart block. block: checkout Issues related to the checkout block. labels May 16, 2024
@opr opr self-assigned this May 16, 2024
Copy link
Contributor

github-actions bot commented May 16, 2024

Test using WordPress Playground

The changes in this pull request can be previewed and tested using a WordPress Playground instance.
WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Test this pull request with WordPress Playground.

Note that this URL is valid for 30 days from when this comment was last updated. You can update it by closing/reopening the PR or pushing a new commit.

@opr opr marked this pull request as ready for review May 16, 2024 16:27
@woocommercebot woocommercebot requested review from a team and senadir and removed request for a team May 16, 2024 16:28
Copy link
Contributor

Hi @senadir,

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:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

@senadir
Copy link
Member

senadir commented May 20, 2024

@opr you need to update tests that still refer to 0.00$ to Free.

@opr
Copy link
Contributor Author

opr commented May 20, 2024

@opr you need to update tests that still refer to 0.00$ to Free.

Thanks, yeah I plan to work on this today.

@github-actions github-actions bot added the focus: e2e tests Issues related to e2e tests label May 20, 2024
Copy link
Member

@senadir senadir left a comment

Choose a reason for hiding this comment

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

Checks out!

@senadir senadir merged commit d7ca80d into trunk May 20, 2024
36 checks passed
@senadir senadir deleted the update/free-shipping-sidebar branch May 20, 2024 16:42
@github-actions github-actions bot added this to the 9.0.0 milestone May 20, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label May 20, 2024
@rodelgc rodelgc removed the needs: analysis Indicates if the PR requires a PR testing scrub session. label May 22, 2024
@rodelgc rodelgc added needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. status: analysis complete Indicates if a PR has been analysed by Solaris labels May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
block: cart Issues related to the cart block. block: checkout Issues related to the checkout block. focus: cart Issues related to the cart. focus: checkout Issues related to checkout page. focus: e2e tests Issues related to e2e tests needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. plugin: woocommerce Issues related to the WooCommerce Core plugin. status: analysis complete Indicates if a PR has been analysed by Solaris team: Rubik Store API checkout endpoints, Mini-Cart, Cart and Checkout related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants