Skip to content

Spike: Make Place order button in the legacy checkout content dynamic based on the payment method selected #10553

@brettshumaker

Description

@brettshumaker

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    focus: checkout paymentsneeds demoPR should provide screenshot or gif of changes to be reviewed by product and designneeds designThe issue requires design input/work from a designer.type: spike

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions