# Use params on URL

Instead of having to change currencies by choosing from a dropdown list, you can change them on the URL by changing the currency code.

eg: {your-site-url}.com/?yay-currency=EUR. You can convert to USD currency by replacing EUR with USD.

<figure><img src="/files/svAQ2U2deBvCE4OilkEp" alt=""><figcaption></figcaption></figure>

To do this, you can add the following code to [Code Snippets](https://wordpress.org/plugins/code-snippets/) or to the file `functions.php` of your store theme.&#x20;

{% hint style="info" %}
It is recommended to add it to`functions.php` of child theme so that it will be preserved when you update the theme.
{% endhint %}

```
add_filter('yay_currency_use_params', 'yay_currency_use_params', 10,1);
function yay_currency_use_params( $use_param ) {
    return true;
}
```

In case you don't want to use this parameter: ?yay-currency. You can use this hook to rename it: yay\_currency\_param\_name&#x20;

<pre><code><strong>add_filter( 'yay_currency_param_name',  'custom_yay_currency_param_name' );
</strong>function custom_yay_currency_param_name( $param_name ) {
   $param_name = 'your_change';
   return $param_name;
}
</code></pre>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.yaycommerce.com/yaycurrency/configurations/display-options/use-params-on-url.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
