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 issue with syncing shipping rates with more than two decimals #2573

Conversation

jorgemd24
Copy link
Contributor

Changes proposed in this Pull Request:

While working on #2527, @mikkamp found an issue where shipping rates with more than two decimal places were not syncing correctly. This PR makes sure that rates are always synced with exactly two decimal places.

Screenshots:

Detailed test instructions:

  1. Go to WC -> Settings -> Shipping
  2. Go to the flat rate section, right-click on "Edit," and open it in a new tab to access the classic Shipping settings screen.

image

  1. Set a price with more than two decimal places.

image

  1. Go to GFW -> Dashboard and click "Edit" in the free listings section.

image

  1. Click "Save Changes" and verify that there are no errors and that the shipping settings are correctly updated in your Merchant Center.

Additional details:

Changelog entry

Fix - Issue with syncing shipping rates with more than two decimals

@github-actions github-actions bot added type: bug The issue is a confirmed bug. changelog: fix Took care of something that wasn't working. labels Aug 30, 2024
Copy link

codecov bot commented Aug 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.0%. Comparing base (93b4180) to head (708910d).
Report is 3 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             develop   #2573     +/-   ##
===========================================
+ Coverage       64.5%   65.0%   +0.5%     
  Complexity      4591    4591             
===========================================
  Files            796     475    -321     
  Lines          22992   17907   -5085     
  Branches        1234       0   -1234     
===========================================
- Hits           14837   11646   -3191     
+ Misses          7982    6261   -1721     
+ Partials         173       0    -173     
Flag Coverage Δ
js-unit-tests ?
php-unit-tests 65.0% <100.0%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/Shipping/ShippingRate.php 88.0% <100.0%> (ø)

... and 321 files with indirect coverage changes

@jorgemd24 jorgemd24 marked this pull request as ready for review August 30, 2024 13:50
@jorgemd24 jorgemd24 self-assigned this Aug 30, 2024
@jorgemd24 jorgemd24 requested a review from a team August 30, 2024 13:50
Copy link
Contributor

@martynmjones martynmjones left a comment

Choose a reason for hiding this comment

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

Hey @jorgemd24, thanks for the fix.

Confirmed that no errors are triggered when saving the campaign settings and the value is correctly synced with Google.

@jorgemd24 jorgemd24 merged commit 82ffce8 into develop Sep 3, 2024
14 checks passed
@jorgemd24 jorgemd24 deleted the fix/issue-with-syncing-shipping-rates-with-more-than-two-decimals branch September 3, 2024 11:42
@martynmjones martynmjones mentioned this pull request Sep 5, 2024
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: fix Took care of something that wasn't working. type: bug The issue is a confirmed bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants