Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Add "Collection from..." in Checkout sidebar when selecting local pickup #8305

Merged
merged 25 commits into from
Apr 6, 2023

Conversation

opr
Copy link
Contributor

@opr opr commented Jan 26, 2023

This PR is based on add/local-pickup-methods which has a PR here: #8256

In this PR I made the following changes:

  • Add a PickupLocation component. This will render when the user has chosen "Local pickup" as their shipping method.
  • Move areRatesCollectible function outside of the useShippingData hook. It made more sense not to create new functions every time the hook is called. For reference, this function which will check whether the selected rate is a collectible one (collectible methods are saved in the site setting collectibleMethodIds) - this is required to know whether we should be dispatching the rate change to all packages (if collectible, yes) or just to a single package (if not collectible this is OK).
  • Update the wc/store/checkout data store's prefersCollection selector to check all collectible methods, not just local_pickup
  • Add tests for ShippingAddress component, but only ones that cover this PR, new tests should be added to cover some address scenarios (these could be added within ShippingLocation actually)
  • Add tests for PickupLocation
  • Ensure only the local pickup method name appears in the shipping totals if using multiple packages

Fixes #7997

Screenshots

Before (Note the multiple package names & no pickup address) After
image image

Testing

Automated Tests

  • Changes in this PR are covered by Automated Tests.
    • Unit tests
    • E2E tests

Internal developer Testing

Expand for example shipping method
function amazon_locker_shipping_init() {
	class Amazon_Locker_Shipping_Method extends WC_Shipping_Method {

		/**
		 * Min amount to be valid.
		 *
		 * @var integer
		 */
		public $min_amount = 0;

		/**
		 * Requires option.
		 *
		 * @var string
		 */
		public $requires = '';

		/**
		 * Constructor.
		 *
		 * @param int $instance_id Shipping method instance.
		 */
		public function __construct( $instance_id = 0 ) {
			$this->id                 = 'amazon_locker_shipping';
			$this->instance_id        = absint( $instance_id );
                        $this->title              = 'Amazon locker';
			$this->method_title       = __( 'Amazon locker', 'woocommerce' );
			$this->method_description = __( 'Get your order shipped to an amazon locker.', 'woocommerce' );
			$this->supports           = array(
				'instance-settings',
				'instance-settings-modal',
				'local-pickup',
			);

			$this->init();
		}

		/**
		 * Initialize Amazon Locker shipping.
		 */
		public function init() {
		}

		/**
		 * See if Amazon locker shipping is available based on the package and cart.
		 *
		 * @param array $package Shipping package.
		 * @return bool
		 */
		public function is_available( $package ) {
			return true;
		}

		/**
		 * Called to calculate shipping rates for this method. Rates can be added using the add_rate() method.
		 *
		 * @param array $package Shipping package.
		 * @uses WC_Shipping_Method::add_rate()
		 */
		public function calculate_shipping( $package = array() ) {
			$this->add_rate(
				array(
					'label'   => $this->title,
					'cost'    => 0,
					'taxes'   => false,
					'package' => $package,
				)
			);
		}
	}
}

add_action( 'woocommerce_shipping_init', 'amazon_locker_shipping_init' ); // use this hook to initialize your new custom method

function add_amazon_locker_shipping( $methods ) {
	$methods['amazon_locker_shipping'] = 'Amazon_Locker_Shipping_Method';

	return $methods;
}
add_filter( 'woocommerce_shipping_methods', 'add_amazon_locker_shipping' );
  1. Enable this method for one of your shipping zones. Note, the settings UI doesn't work properly for this method but that is OK.
  2. Enable the built-in local pickup too (WooCommerce -> Settings -> Shipping -> Local pickup) and add a location. Please ensure you set an address for this location. Set up two of these!
  3. Enable some regular methods (flat rate, free) for your zone too.
  4. Enable the Multiple Packages for WooCommerce plugin, go to its settings page (WooCommerce -> Settings -> Multiple packages) and change the Group By option to be Product (individual).
  5. Add some items to your cart (at least 2) go to the Checkout page.
  6. For the Shipping method, select Shipping and then select a different rate for each package. It should look like this.

image

8. In the sidebar, ensure you see the shipping total correctly and that it lists both methods for shipping like so:

image

9. Change shipping method back to `Local Pickup` and ensure that the sidebar updates to only show **one** shipping method name. 10. Select the Amazon locker option and check the sidebar, only one method name should show, and it should also say "Collection from Amazon locker" 11. Choose one of the built-in local pickup rates you set up in step 3. 12. Ensure the sidebar updates and shows the correct method name and shows "Collection from "

User facing testing

  1. Enable the built-in local pickup method (WooCommerce -> Settings -> Shipping -> Local pickup) and add two locations. Please ensure you set a different address for both of these locations.
  2. Enable some different regular shipping methods (flat rate, free) for your zone too.
  3. Add at least two items to your cart and go to the Checkout page.
  4. For the Shipping Method option, select "Shipping"
  5. Fill in your address and ensure the rates you set up in step 2 are shown. Select one.
  6. In the Checkout sidebar, ensure you see the correct rate, and your entered address.
  7. Return to the Shipping Method option, select "Local pickup"
  8. Check the sidebar and ensure the sidebar shows local pickup, and shows the address for the pickup location you have chosen.
  9. Change the location and ensure the sidebar updates.
  • Do not include in the Testing Notes

WooCommerce Visibility

  • WooCommerce Core
  • Feature plugin
  • Experimental

Performance Impact

Changelog

Show the collection address in the shipping section of the Checkout sidebar when using a Local Pickup method.

@opr opr added status: needs review type: enhancement The issue is a request for an enhancement. block: cart Issues related to the cart block. block: checkout Issues related to the checkout block. labels Jan 26, 2023
@opr opr self-assigned this Jan 26, 2023
@woocommercebot woocommercebot requested review from a team and senadir and removed request for a team January 26, 2023 18:06
@github-actions
Copy link
Contributor

github-actions bot commented Jan 26, 2023

The release ZIP for this PR is accessible via:

https://wcblocks.wpcomstaging.com/wp-content/uploads/woocommerce-gutenberg-products-block-8305.zip

Script Dependencies Report

The compare-assets action has detected some changed script dependencies between this branch and trunk. Please review and confirm the following are correct before merging.

Script Handle Added Removed
wc-blocks.js wp-blocks, wp-compose, wp-element, wp-hooks, wp-i18n, wp-polyfill, wp-primitives ⚠️
active-filters.js lodash, wc-blocks-data-store, wc-price-format, wc-settings, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-data, wp-element, wp-html-entities, wp-i18n, wp-is-shallow-equal, wp-polyfill, wp-primitives, wp-url ⚠️
all-products.js lodash, react, wc-blocks-checkout, wc-blocks-data-store, wc-blocks-registry, wc-blocks-shared-context, wc-blocks-shared-hocs, wc-price-format, wc-settings, wp-a11y, wp-api-fetch, wp-autop, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-data, wp-deprecated, wp-dom, wp-element, wp-escape-html, wp-hooks, wp-html-entities, wp-i18n, wp-is-shallow-equal, wp-polyfill, wp-primitives, wp-url, wp-warning, wp-wordcount ⚠️
all-reviews.js lodash, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-element, wp-escape-html, wp-i18n, wp-is-shallow-equal, wp-polyfill, wp-primitives ⚠️
attribute-filter.js lodash, react, wc-blocks-checkout, wc-blocks-data-store, wc-settings, wp-a11y, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-data, wp-deprecated, wp-dom, wp-element, wp-html-entities, wp-i18n, wp-is-shallow-equal, wp-keycodes, wp-polyfill, wp-primitives, wp-url, wp-warning ⚠️
breadcrumbs.js wc-settings, wp-block-editor, wp-blocks, wp-components, wp-element, wp-i18n, wp-polyfill, wp-primitives ⚠️
cart.js lodash, react, wc-blocks-checkout, wc-blocks-data-store, wc-blocks-registry, wc-blocks-shared-context, wc-blocks-shared-hocs, wc-price-format, wc-settings, wp-a11y, wp-api-fetch, wp-autop, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-core-data, wp-data, wp-deprecated, wp-dom, wp-editor, wp-element, wp-hooks, wp-html-entities, wp-i18n, wp-is-shallow-equal, wp-keycodes, wp-plugins, wp-polyfill, wp-primitives, wp-url, wp-warning, wp-wordcount ⚠️
catalog-sorting.js wp-block-editor, wp-blocks, wp-components, wp-element, wp-i18n, wp-polyfill, wp-primitives ⚠️
checkout.js lodash, react, wc-blocks-checkout, wc-blocks-data-store, wc-blocks-registry, wc-price-format, wc-settings, wp-a11y, wp-api-fetch, wp-autop, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-core-data, wp-data, wp-deprecated, wp-dom, wp-editor, wp-element, wp-hooks, wp-html-entities, wp-i18n, wp-is-shallow-equal, wp-keycodes, wp-plugins, wp-polyfill, wp-primitives, wp-url, wp-warning, wp-wordcount ⚠️
customer-account.js wc-settings, wp-block-editor, wp-blocks, wp-components, wp-element, wp-i18n, wp-polyfill, wp-primitives ⚠️
featured-category.js lodash, react, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-data, wp-element, wp-escape-html, wp-html-entities, wp-i18n, wp-is-shallow-equal, wp-polyfill, wp-primitives, wp-url ⚠️
featured-product.js lodash, react, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-data, wp-element, wp-escape-html, wp-html-entities, wp-i18n, wp-is-shallow-equal, wp-polyfill, wp-primitives, wp-url ⚠️
filter-wrapper.js wp-block-editor, wp-blocks, wp-element, wp-i18n, wp-polyfill, wp-primitives ⚠️
handpicked-products.js lodash, react, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-element, wp-escape-html, wp-html-entities, wp-i18n, wp-polyfill, wp-primitives, wp-server-side-render, wp-url ⚠️
legacy-template.js wc-settings, wp-block-editor, wp-blocks, wp-components, wp-data, wp-element, wp-i18n, wp-polyfill, wp-primitives ⚠️
mini-cart.js react, wc-price-format, wc-settings, wp-block-editor, wp-blocks, wp-components, wp-data, wp-dom, wp-element, wp-i18n, wp-polyfill, wp-primitives ⚠️
mini-cart-contents.js lodash, react, wc-blocks-checkout, wc-blocks-data-store, wc-blocks-registry, wc-price-format, wc-settings, wp-a11y, wp-autop, wp-block-editor, wp-blocks, wp-compose, wp-data, wp-deprecated, wp-dom, wp-element, wp-hooks, wp-html-entities, wp-i18n, wp-is-shallow-equal, wp-keycodes, wp-polyfill, wp-primitives, wp-url, wp-warning, wp-wordcount ⚠️
store-notices.js wp-block-editor, wp-blocks, wp-components, wp-element, wp-i18n, wp-polyfill, wp-primitives ⚠️
price-filter.js lodash, react, wc-blocks-data-store, wc-price-format, wc-settings, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-data, wp-element, wp-i18n, wp-is-shallow-equal, wp-polyfill, wp-primitives, wp-url ⚠️
product-best-sellers.js lodash, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-element, wp-escape-html, wp-html-entities, wp-i18n, wp-polyfill, wp-primitives, wp-server-side-render, wp-url ⚠️
product-category.js lodash, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-element, wp-escape-html, wp-html-entities, wp-i18n, wp-polyfill, wp-primitives, wp-server-side-render, wp-url ⚠️
product-categories.js wp-block-editor, wp-blocks, wp-components, wp-element, wp-i18n, wp-polyfill, wp-primitives, wp-server-side-render ⚠️
product-new.js lodash, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-element, wp-escape-html, wp-html-entities, wp-i18n, wp-polyfill, wp-primitives, wp-server-side-render, wp-url ⚠️
product-on-sale.js lodash, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-element, wp-escape-html, wp-html-entities, wp-i18n, wp-polyfill, wp-primitives, wp-server-side-render, wp-url ⚠️
product-query.js lodash, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-data, wp-element, wp-escape-html, wp-hooks, wp-html-entities, wp-i18n, wp-polyfill, wp-primitives, wp-url ⚠️
product-results-count.js wp-block-editor, wp-blocks, wp-element, wp-i18n, wp-polyfill, wp-primitives ⚠️
product-search.js wc-settings, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-data, wp-element, wp-i18n, wp-polyfill, wp-primitives ⚠️
product-tag.js lodash, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-element, wp-html-entities, wp-i18n, wp-polyfill, wp-primitives, wp-server-side-render, wp-url ⚠️
product-top-rated.js lodash, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-element, wp-escape-html, wp-html-entities, wp-i18n, wp-polyfill, wp-primitives, wp-server-side-render, wp-url ⚠️
products-by-attribute.js lodash, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-data, wp-element, wp-escape-html, wp-html-entities, wp-i18n, wp-polyfill, wp-primitives, wp-server-side-render, wp-url ⚠️
rating-filter.js lodash, react, wc-blocks-checkout, wc-blocks-data-store, wc-settings, wp-a11y, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-data, wp-deprecated, wp-dom, wp-element, wp-i18n, wp-is-shallow-equal, wp-keycodes, wp-polyfill, wp-primitives, wp-url, wp-warning ⚠️
reviews-by-category.js lodash, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-element, wp-escape-html, wp-html-entities, wp-i18n, wp-is-shallow-equal, wp-polyfill, wp-primitives, wp-url ⚠️
reviews-by-product.js lodash, react, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-element, wp-escape-html, wp-html-entities, wp-i18n, wp-is-shallow-equal, wp-polyfill, wp-primitives, wp-url ⚠️
stock-filter.js lodash, react, wc-blocks-checkout, wc-blocks-data-store, wc-settings, wp-a11y, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-data, wp-deprecated, wp-dom, wp-element, wp-html-entities, wp-i18n, wp-is-shallow-equal, wp-keycodes, wp-polyfill, wp-primitives, wp-url, wp-warning ⚠️

This comment was automatically generated by the ./github/compare-assets action.

TypeScript Errors Report

  • Files with errors: 449
  • Total errors: 2205

🎉 🎉 This PR does not introduce new TS errors.

comments-aggregator

@github-actions
Copy link
Contributor

github-actions bot commented Jan 26, 2023

Size Change: +903 B (0%)

Total Size: 1.06 MB

Filename Size Change
build/active-filters.js 7.49 kB -3 B (0%)
build/all-products.js 37.8 kB -3 B (0%)
build/all-reviews.js 7.66 kB +1 B (0%)
build/attribute-filter.js 13.2 kB +3 B (0%)
build/cart-blocks/order-summary-shipping-frontend.js 11.8 kB +237 B (+2%)
build/cart.js 48.6 kB +210 B (0%)
build/checkout-blocks/order-summary-shipping-frontend.js 11.8 kB +247 B (+2%)
build/checkout-frontend.js 30.9 kB -1 B (0%)
build/checkout.js 46.2 kB +215 B (0%)
build/legacy-template.js 5.57 kB +1 B (0%)
build/price-filter.js 8.4 kB -2 B (0%)
build/product-categories.js 2.37 kB +1 B (0%)
build/product-new.js 8.26 kB -1 B (0%)
build/product-query.js 11 kB +3 B (0%)
build/product-search.js 2.63 kB -2 B (0%)
build/product-top-rated.js 8.49 kB -1 B (0%)
build/products-by-attribute.js 9.58 kB -3 B (0%)
build/rating-filter.js 6.98 kB +1 B (0%)
build/reviews-by-category.js 11.9 kB +2 B (0%)
build/reviews-by-product.js 13 kB +2 B (0%)
build/wc-blocks-vendors.js 63.6 kB -4 B (0%)
ℹ️ View Unchanged
Filename Size
build/active-filters-frontend.js 7.98 kB
build/active-filters-wrapper-frontend.js 5.97 kB
build/all-products-frontend.js 11.8 kB
build/attribute-filter-frontend.js 22.5 kB
build/attribute-filter-wrapper-frontend.js 7.1 kB
build/blocks-checkout.js 35.1 kB
build/breadcrumbs.js 2.04 kB
build/cart-blocks/cart-accepted-payment-methods-frontend.js 1.38 kB
build/cart-blocks/cart-cross-sells-frontend.js 253 B
build/cart-blocks/cart-cross-sells-products-frontend.js 9.72 kB
build/cart-blocks/cart-express-payment--checkout-blocks/express-payment-frontend.js 5.16 kB
build/cart-blocks/cart-express-payment-frontend.js 718 B
build/cart-blocks/cart-items-frontend.js 301 B
build/cart-blocks/cart-line-items--mini-cart-contents-block/products-table-frontend.js 5.36 kB
build/cart-blocks/cart-line-items-frontend.js 1.07 kB
build/cart-blocks/cart-order-summary-frontend.js 1.24 kB
build/cart-blocks/cart-totals-frontend.js 308 B
build/cart-blocks/empty-cart-frontend.js 344 B
build/cart-blocks/filled-cart-frontend.js 655 B
build/cart-blocks/order-summary-coupon-form-frontend.js 1.62 kB
build/cart-blocks/order-summary-discount-frontend.js 2.12 kB
build/cart-blocks/order-summary-fee-frontend.js 272 B
build/cart-blocks/order-summary-heading-frontend.js 455 B
build/cart-blocks/order-summary-subtotal-frontend.js 273 B
build/cart-blocks/order-summary-taxes-frontend.js 431 B
build/cart-blocks/proceed-to-checkout-frontend.js 1.33 kB
build/cart-frontend.js 29.3 kB
build/catalog-sorting.js 1.7 kB
build/checkout-blocks/actions-frontend.js 1.85 kB
build/checkout-blocks/billing-address-frontend.js 4.18 kB
build/checkout-blocks/contact-information-frontend.js 2.05 kB
build/checkout-blocks/express-payment-frontend.js 1.14 kB
build/checkout-blocks/fields-frontend.js 331 B
build/checkout-blocks/order-note-frontend.js 1.14 kB
build/checkout-blocks/order-summary-cart-items-frontend.js 3.68 kB
build/checkout-blocks/order-summary-coupon-form-frontend.js 1.78 kB
build/checkout-blocks/order-summary-discount-frontend.js 2.29 kB
build/checkout-blocks/order-summary-fee-frontend.js 275 B
build/checkout-blocks/order-summary-frontend.js 1.24 kB
build/checkout-blocks/order-summary-subtotal-frontend.js 273 B
build/checkout-blocks/order-summary-taxes-frontend.js 431 B
build/checkout-blocks/payment-frontend.js 8.27 kB
build/checkout-blocks/pickup-options-frontend.js 4.11 kB
build/checkout-blocks/shipping-address-frontend.js 4.14 kB
build/checkout-blocks/shipping-method-frontend.js 2.61 kB
build/checkout-blocks/shipping-methods-frontend.js 5.81 kB
build/checkout-blocks/terms-frontend.js 1.56 kB
build/checkout-blocks/totals-frontend.js 311 B
build/customer-account.js 3.16 kB
build/featured-category.js 14 kB
build/featured-product.js 14.4 kB
build/filter-wrapper-frontend.js 14 kB
build/filter-wrapper.js 2.4 kB
build/general-style-rtl.css 1.31 kB
build/general-style.css 1.31 kB
build/handpicked-products.js 7.92 kB
build/mini-cart-component-frontend.js 28.3 kB
build/mini-cart-contents-block/cart-button-frontend.js 820 B
build/mini-cart-contents-block/checkout-button-frontend.js 821 B
build/mini-cart-contents-block/empty-cart-frontend.js 360 B
build/mini-cart-contents-block/filled-cart-frontend.js 268 B
build/mini-cart-contents-block/footer-frontend.js 3.18 kB
build/mini-cart-contents-block/items-frontend.js 237 B
build/mini-cart-contents-block/products-table-frontend.js 589 B
build/mini-cart-contents-block/shopping-button-frontend.js 705 B
build/mini-cart-contents-block/title-frontend.js 368 B
build/mini-cart-contents.js 17.4 kB
build/mini-cart-frontend.js 2.02 kB
build/mini-cart.js 4.49 kB
build/price-filter-frontend.js 13.9 kB
build/price-filter-wrapper-frontend.js 6.96 kB
build/price-format.js 1.19 kB
build/product-add-to-cart-frontend.js 6.43 kB
build/product-add-to-cart.js 178 B
build/product-best-sellers.js 8.26 kB
build/product-button-frontend.js 1.92 kB
build/product-category.js 9.25 kB
build/product-image-frontend.js 1.76 kB
build/product-image.js 178 B
build/product-on-sale.js 8.59 kB
build/product-price-frontend.js 2.08 kB
build/product-rating-frontend.js 1.33 kB
build/product-results-count.js 1.66 kB
build/product-sale-badge-frontend.js 975 B
build/product-sku-frontend.js 999 B
build/product-stock-indicator-frontend.js 1.01 kB
build/product-summary-frontend.js 1.29 kB
build/product-tag.js 8.74 kB
build/product-title-frontend.js 1.37 kB
build/product-title.js 178 B
build/rating-filter-frontend.js 20.8 kB
build/rating-filter-wrapper-frontend.js 5.58 kB
build/reviews-frontend.js 7.1 kB
build/stock-filter-frontend.js 21.1 kB
build/stock-filter-wrapper-frontend.js 5.83 kB
build/stock-filter.js 7.7 kB
build/store-notices.js 1.69 kB
build/vendors--attribute-filter-wrapper--cart-blocks/cart-cross-sells-products--cart-blocks/order-summary--82e4ed06-frontend.js 6.82 kB
build/vendors--attribute-filter-wrapper--rating-filter-wrapper--stock-filter-wrapper-frontend.js 7.7 kB
build/vendors--cart-blocks/cart-cross-sells-products--cart-blocks/cart-line-items--cart-blocks/cart-order--3c5fe802-frontend.js 5.26 kB
build/vendors--cart-blocks/cart-cross-sells-products--cart-blocks/order-summary-shipping--checkout-blocks--18f9376a-frontend.js 19.4 kB
build/vendors--cart-blocks/cart-cross-sells-products--product-add-to-cart-frontend.js 7.25 kB
build/vendors--cart-blocks/cart-line-items--checkout-blocks/order-summary-cart-items--mini-cart-contents---233ab542-frontend.js 3.14 kB
build/vendors--cart-blocks/order-summary-shipping--checkout-blocks/order-summary-shipping--checkout-block--24d3fc0c-frontend.js 8.25 kB
build/vendors--checkout-blocks/billing-address--checkout-blocks/shipping-address-frontend.js 5.44 kB
build/vendors--checkout-blocks/shipping-method-frontend.js 12 kB
build/wc-blocks-data.js 21.8 kB
build/wc-blocks-editor-style-rtl.css 5.8 kB
build/wc-blocks-editor-style.css 5.8 kB
build/wc-blocks-google-analytics.js 1.56 kB
build/wc-blocks-middleware.js 933 B
build/wc-blocks-registry.js 3.15 kB
build/wc-blocks-shared-context.js 1.52 kB
build/wc-blocks-shared-hocs.js 1.73 kB
build/wc-blocks-style-rtl.css 27.6 kB
build/wc-blocks-style.css 27.6 kB
build/wc-blocks-vendors-style-rtl.css 1.96 kB
build/wc-blocks-vendors-style.css 1.96 kB
build/wc-blocks.js 2.62 kB
build/wc-payment-method-bacs.js 816 B
build/wc-payment-method-cheque.js 811 B
build/wc-payment-method-cod.js 909 B
build/wc-payment-method-paypal.js 837 B
build/wc-settings.js 2.6 kB
build/wc-shipping-method-pickup-location.js 29.9 kB
build/woo-directives-runtime.js 2.73 kB
build/woo-directives-vendors.js 7.91 kB

compressed-size-action

@opr opr force-pushed the add/pickup-from branch from c2f903e to b753412 Compare January 30, 2023 10:33
@opr opr force-pushed the add/local-pickup-methods branch from af015a4 to edff9a1 Compare February 3, 2023 11:38
Base automatically changed from add/local-pickup-methods to trunk February 3, 2023 16:00
senadir
senadir previously requested changes Feb 6, 2023
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.

Thank you for working on this Thomas!

Unfortunately the current iteration still includes the (change address) text and it's confusing because we're showing the local pickup address, which is not something you can change.

image

I'd refrain from reviewing the code because I know removing (change address) would switch up and complicate the code a bit more.

@github-actions
Copy link
Contributor

This PR has been marked as stale because it has not seen any activity within the past 7 days. Our team uses this tool to help surface pull requests that have slipped through review.

If deemed still relevant, the pr can be kept active by ensuring it's up to date with the main branch and removing the stale label.

@github-actions github-actions bot added the status: stale Stale issues and PRs have had no updates for 60 days. label Feb 14, 2023
@github-actions github-actions bot removed the status: stale Stale issues and PRs have had no updates for 60 days. label Feb 22, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2023

This PR has been marked as stale because it has not seen any activity within the past 7 days. Our team uses this tool to help surface pull requests that have slipped through review.

If deemed still relevant, the pr can be kept active by ensuring it's up to date with the main branch and removing the stale label.

@github-actions github-actions bot added the status: stale Stale issues and PRs have had no updates for 60 days. label Mar 2, 2023
@opr opr force-pushed the add/pickup-from branch from b753412 to 4ec94ea Compare March 10, 2023 18:02
@opr
Copy link
Contributor Author

opr commented Mar 10, 2023

Hey @senadir thanks for the review and sorry for the delay getting it updated.

I fixed it up now so the conflicts are resolved and the change address button is hidden when a local pickup rate is chosen.

I will ask someone else to review since you're on rotation.

@opr opr requested review from senadir and a team March 10, 2023 18:03
@opr opr removed the status: stale Stale issues and PRs have had no updates for 60 days. label Mar 10, 2023
@github-actions
Copy link
Contributor

This PR has been marked as stale because it has not seen any activity within the past 7 days. Our team uses this tool to help surface pull requests that have slipped through review.

If deemed still relevant, the pr can be kept active by ensuring it's up to date with the main branch and removing the stale label.

@github-actions github-actions bot added the status: stale Stale issues and PRs have had no updates for 60 days. label Mar 18, 2023
@wavvves
Copy link
Contributor

wavvves commented Mar 22, 2023

Maybe I messed up testing notes but Amazon locker does not show on Local Pickup:

image

It does show as a regular shipping method, but since it's not pickup it won't appear as "collection from.." on the sidebar

image

Every step worked up until step 10

@github-actions github-actions bot removed the status: stale Stale issues and PRs have had no updates for 60 days. label Mar 27, 2023
@opr opr force-pushed the add/pickup-from branch from 24c0ac3 to bcdaa4d Compare March 27, 2023 14:27
@opr
Copy link
Contributor Author

opr commented Mar 27, 2023

@wavvves thanks for your patience

Maybe I messed up testing notes but Amazon locker does not show on Local Pickup:

No, you didn't. The shipping method declared incorrect compatibility, I fixed it now!

I also improved the useSelect mock in the unit tests in 4e6ad75. Previously the mock returned { prefersCollection: false } for all invocations, this one is more selective and prevents components who rely on useSelect further down the tree from breaking.

@opr opr force-pushed the add/pickup-from branch from 14e9d30 to b519102 Compare April 6, 2023 11:36
@opr opr dismissed senadir’s stale review April 6, 2023 11:55

Stale, has been addressed

@opr opr merged commit afc9416 into trunk Apr 6, 2023
@opr opr deleted the add/pickup-from branch April 6, 2023 11:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: cart Issues related to the cart block. block: checkout Issues related to the checkout block. type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Local Pickup: show "Pickup from [location address]" when local pickup is selected.
4 participants