Upgrade accelerated checkout
Ensure your storefront customizations work with accelerated checkout buttons
Anchor link to section titled "Ensure your storefront customizations work with accelerated checkout buttons"We’re rolling out improvements to accelerated checkout buttons on storefront pages. These changes will ensure that checkout buttons support features like Functions and Bundles, and will improve button performance.
As part of these changes, the HTML for the accelerated checkout buttons has been moved into a custom element with a closed shadow DOM. This new implementation means that existing styling and event tracking that targets the HTML of these buttons will no longer work correctly.
Step 1: Review and update your existing style customizations
Anchor link to section titled "Step 1: Review and update your existing style customizations"- From the Shopify admin of your development store, go to Online Store > Themes and find the theme you want to test.
- Click the
…
button, and then click Preview. - Navigate to any pages where you show accelerated checkout buttons, such as the product or cart pages, and ensure your buttons are showed in the manner you expect.
- Use the following supported CSS custom properties to make changes, and ensure that the buttons match the remainder of your theme. These CSS custom properties can be applied to accelerated checkout buttons on product and cart pages.
CSS custom properties | Description | Default |
---|---|---|
--shopify-accelerated-checkout-button-block-size |
The height of the individual rendered wallet button. The minimum supported height is 25px , and the maximum supported height is 55px . |
44px on product pages, 42px on cart in the vertical layout stack. |
--shopify-accelerated-checkout-button-inline-size |
(Cart only) The height of the individual rendered wallet buttons when in the horizontal row layout. The minimum supported height is 25px , and the maximum supported height is 55px . For more information on the horizontal and vertical layouts only on cart pages, see Additional alignment properties. |
54px |
--shopify-accelerated-checkout-button-border-radius |
The corner radius of the rendered wallet buttons. | 0px on product pages, 4px on cart. |
--shopify-accelerated-checkout-button-box-shadow |
The drop shadow cast by the rendered wallet buttons. | none |
--shopify-accelerated-checkout-skeleton-background-color |
The background color of the loading skeleton that appears before the buttons are able to render. | #dedede |
--shopify-accelerated-checkout-skeleton-animation-opacity-start |
The initial opacity in the animation on the loading skeleton, which fades from the start value, to the end value, and back again. Accepts any valid value for opacity . |
1 |
--shopify-accelerated-checkout-skeleton-animation-opacity-end |
The opacity transitioned to in the animation on the loading skeleton, which fades from the start value, to the end value, and back again. Accepts any valid value for opacity . |
0.5 |
--shopify-accelerated-checkout-skeleton-animation-duration |
How long the opacity transition takes to complete (from start, to end, and back to start). | 4s |
--shopify-accelerated-checkout-skeleton-animation-timing-function |
The timing-function for the opacity animation on the skeleton. | ease |
--shopify-accelerated-checkout-inline-alignment |
(Cart only) The positioning of the wallet buttons within the container element when in the horizontal row layout. Accepts any valid value for justify-content. | start |
--shopify-accelerated-checkout-row-gap |
(Cart only) The vertical spacing between the rendered wallets buttons in the vertical stack layout. | 8px |
We recommend applying these CSS custom properties on the shopify-accelerated-checkout
and shopify-accelerated-checkout-cart
element selectors, which are the two custom elements used to render accelerated checkout buttons.
- Add the CSS custom properties to your theme and publish it so your store is ready and future proofed when the accelerated checkout button markup changes on September 15th, 2024.
Step 2: Review and update any third party analytic tools
Anchor link to section titled "Step 2: Review and update any third party analytic tools"Because accelerated checkout buttons now load using a custom element with a shadow DOM, only composed events will be available for merchants that want to track button clicks. You therefore shouldn't depend on any markup to track usage other than the elements listed in this section.
- From the Shopify admin of your development store, go to Online Store > Themes.
- Select the preview feature for the theme you want to test.
- Navigate to any pages where you show accelerated checkout buttons, such as the product or cart pages, and ensure your buttons are showed in the manner you expect.
- Inspect the buttons and note the new markup structure. If you are using tools for tracking clicks on accelerated checkout buttons, then you can listen to the following elements for clicks:
- Shop Pay:
<shop-pay-wallet-button>
- Amazon Pay:
<shopify-amazon-pay-button>
- Apple Pay:
<shopify-apple-pay-button>
- Google Pay:
<shopify-google-pay-button>
- PayPal:
<shopify-paypal-button>
- Shop Pay:
- Update your analytics scripts to begin listening for clicks on the new elements so your store is ready and future-proofed when the accelerated checkout button markup changes on September 15th, 2024.