> For the complete documentation index, see [llms.txt](https://integrate.skio.com/skio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://integrate.skio.com/skio/troubleshooting/selling-plan-cannot-be-applied-to-variant.md).

# Selling Plan Cannot Be Applied to Variant

This error typically occurs when the plan picker does not register that the selected variant has changed. This can occur for a variety of reasons, but the fix is usually the same:

In your theme's Javascript, often there is a function that is called on variant change. If not, create one. Within this function, add the following:

```
document.querySelector('[name=id]').dispatchEvent(new Event('change'))
```

This event is listened for within `skio-plan-picker.js` to call the update method that will  apply the correct selling plan to the new variant.
