Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The new Shipping extension introduced a new field for Custom package dimensions:
dimensions
. This PR adds this new field to theCustomData
class and uses it when creating aCustomPackage
, so we don't lose the package information and prevent a crash when theCustomPackage
dimensions field is empty. Additionally to this changes I also updated the default value we were using for dimensions now instead of the empty string "" we will use "0 x 0 x 0", so that the app won't crash in case of a custom package with empty dimensions.Testing
It is best to test these changes using the Woo PR