Title: wp_interactivity_config
Published: April 3, 2024
Last modified: May 20, 2026

---

# wp_interactivity_config( string $store_namespace, array $config = array() ): array

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/wp_interactivity_config/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/functions/wp_interactivity_config/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/wp_interactivity_config/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_interactivity_config/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_interactivity_config/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_interactivity_config/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_interactivity_config/?output_format=md#wp--skip-link--target)

Gets and/or sets the configuration of the Interactivity API for a given store namespace.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/wp_interactivity_config/?output_format=md#description)󠁿

If configuration for that store namespace exists, it merges the new provided configuration
with the existing one.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/wp_interactivity_config/?output_format=md#parameters)󠁿

 `$store_namespace`stringrequired

The unique store namespace identifier.

`$config`arrayoptional

The array that will be merged with the existing configuration for the specified 
store namespace.

Default:`array()`

## 󠀁[Return](https://developer.wordpress.org/reference/functions/wp_interactivity_config/?output_format=md#return)󠁿

 array The configuration for the specified store namespace. This will be the updated
configuration if a $config argument was provided.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_interactivity_config/?output_format=md#source)󠁿

    ```php
    function wp_interactivity_config( string $store_namespace, array $config = array() ): array {
    	return wp_interactivity()->config( $store_namespace, $config );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/interactivity-api/interactivity-api.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/interactivity-api/interactivity-api.php#L81)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/interactivity-api/interactivity-api.php#L81-L83)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_interactivity_config/?output_format=md#related)󠁿

| Uses | Description | 
| [wp_interactivity()](https://developer.wordpress.org/reference/functions/wp_interactivity/)`wp-includes/interactivity-api/interactivity-api.php` |

Retrieves the main [WP_Interactivity_API](https://developer.wordpress.org/reference/classes/wp_interactivity_api/) instance.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_interactivity_config/?output_format=md#changelog)󠁿

| Version | Description | 
| [6.5.0](https://developer.wordpress.org/reference/since/6.5.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_interactivity_config%2F)
before being able to contribute a note or feedback.