woocommerce / woocommerce-blocks

(Deprecated) This plugin has been merged into woocommerce/woocommerce
https://wordpress.org/plugins/woo-gutenberg-products-block/
GNU General Public License v3.0
404 stars 218 forks source link

Don't pull entire state from `wc/store/checkout` and instead make more focused selectors #7080

Closed opr closed 1 year ago

opr commented 2 years ago

In https://github.com/woocommerce/woocommerce-blocks/blob/adcf87e09954665950d24b21bfa0107b6cc80e7d/assets/js/base/context/providers/cart-checkout/checkout-processor.js#L57 we get the entire state of the data store.

This is not ideal, and we should remove this selector https://github.com/woocommerce/woocommerce-blocks/blob/361b48b6220f57fab8a62b9a9272757530d6f14a/assets/js/data/checkout/selectors.ts#L47

Wherever getCheckoutState is used, refactor it and take a more explicit approach to what we're pulling out of the data store.

tarunvijwani commented 1 year ago

This is already resolved in #7713