-
Notifications
You must be signed in to change notification settings - Fork 219
Remove Shipping calculator settings and link to the WooCommerce admin settings #11184
Conversation
The release ZIP for this PR is accessible via:
Script Dependencies ReportThere is no changed script dependency between this branch and trunk. This comment was automatically generated by the TypeScript Errors Report
assets/js/blocks/cart/test/block.js
|
Size Change: -8.39 kB (-1%) Total Size: 1.48 MB
ℹ️ View Unchanged
|
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 great, there's one test failing because it tries to toggle the calculator:
shows empty cart when changing the view and allows toggling of shipping calculator
We can just remove the part where it selects the shipping block and keep the empty cart check, like so:
diff --git a/tests/e2e/tests/cart/cart-block.merchant.block_theme.spec.ts b/tests/e2e/tests/cart/cart-block.merchant.block_theme.spec.ts
index 76fb7a316..bb5b08558 100644
--- a/tests/e2e/tests/cart/cart-block.merchant.block_theme.spec.ts
+++ b/tests/e2e/tests/cart/cart-block.merchant.block_theme.spec.ts
@@ -188,24 +188,6 @@ test.describe( 'Merchant → Cart', () => {
' [data-type="woocommerce/empty-cart-block"]'
)
).toBeHidden();
-
- await editor.selectBlocks(
- await editorUtils.getBlockByName(
- 'woocommerce/cart-order-summary-shipping-block'
- )
- );
- await editor.openDocumentSettingsSidebar();
- const shippingLabel = editorUtils.page.getByLabel(
- 'Shipping calculator'
- );
- await shippingLabel.check();
- await expect(
- editor.canvas.getByText( 'Change address' )
- ).toBeVisible();
- await shippingLabel.uncheck();
- await expect(
- editor.canvas.getByText( 'Change address' )
- ).toBeHidden();
} );
} );
} );
assets/js/blocks/cart/inner-blocks/cart-order-summary-shipping/attributes.tsx
Outdated
Show resolved
Hide resolved
assets/js/blocks/cart/inner-blocks/cart-order-summary-shipping/block.tsx
Outdated
Show resolved
Hide resolved
…/block.tsx Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
…oocommerce/woocommerce-blocks into update/shipping-block-settings
Thanks @opr passing now. Can you approve? |
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.
Thanks Mike 🥂
What
Removes block level settings that enable/disable the shipping calculator and whether costs are displayed in favour of a link to the main settings page.
This PR also clears up the verbiage used in other areas to keep text consistent. This includes:
See screenshots for the new panels.
This does introduce the side effect of "losing" the block level setting, but we cannot really sync this back up because it would affect other blocks and the classic checkout. Should only be a minor inconvenience.
Fixes #11010
Why
See #11010
Testing Instructions
Please consider any edge cases this change may have, and also other areas of the product this may impact.
Screenshots or screencast
Cart:
Checkout Shipping Methods:
Checkout Shipping Options:
WooCommerce Visibility
Required:
Checklist
Required:
[type]
label or a[skip-changelog]
label.Conditional:
[skip-changelog]
label is not present).Changelog