Skip to content

ExperimentalAddToCartBuilder: Sub start/end date options not removing when changing options to default #242

Description

@adamjudd

Details

In the ExperimentalAddToCartBuilder element, if you set either of the "Start" or "End" parameters for the subscription settings to something other than their default (which adds the respective sub_startdate or sub_enddate hidden inputs into the form), and then set them back to their default options again, the hidden inputs are not removed from the add to cart form. Turning subscriptions off and on again also doesn't help reset them back to default. Once the hidden inputs are present, they don't appear to be able to be removed without refreshing and starting again.

Steps to replicate

  • Load the ExperimentalAddToCartBuilder element
  • Enable the "Create Subscription" toggle
  • Set "Start" to one of the non default options
  • Complete the additional form field that displays based on your form
  • Note that the sub_startdate hidden input/url parameter is now present for the add to carts
  • Set the "Start" dropdown back to "Immediately"
  • Note that the sub_startdate hidden input/url parameter is still present

Expected outcome

When setting the subscription "Start" back to "Immediately" or the "End" back to "When cancelled", the respective "sub_startdate" or "sub_enddate" fields would be removed from the rendered add to cart form.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions