-
Notifications
You must be signed in to change notification settings - Fork 73
Description
Description
We would like to make the content of the "Place order" button on the legacy (shortcode) checkout dynamic depending on the payment method selected.
Acceptance criteria
- Payment method title
- E.g. "Pay with {{ payment method title }}"
- Payment method icon
- For credit cards, the more card-related information that we are able to display, the better. This may have to be delayed until after payment information has been entered, but we should try to use the EPM button display as a precendent here.
- When a WooPayments payment method is not selected, the button should return to displaying its default text.
Dev notes
Note that for the shortcode checkout, there is a woocommerce_order_button_text that we can use to alter the text of the "Place order" button. I think the trickier part of the shortcode checkout will be detecting the active payment method. On blocks checkout, we can access a data store but we won't have that on shortcodes and might need to rely on listening to change events on the payment method radio group.
Also, note that since this will affect a high impact area of the checkout, we should ensure that this implementation is developed with appropriate caution and that it is tested robustly before it is included.
Additional Context
The previous spike on blocks checkout was in #10384 and its implementation is in #10552