Title: set_transient_{$transient}
Published: April 25, 2014
Last modified: May 20, 2026

---

# do_action( “set_transient_{$transient}”, mixed $value, int $expiration, string $transient )

## In this article

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

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

Fires after the value for a specific transient has been set.

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

The dynamic portion of the hook name, `$transient`, refers to the transient name.

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

 `$value`mixed

Transient value.

`$expiration`int

Time until expiration in seconds.

`$transient`string

The name of the transient.

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

    ```php
    do_action( "set_transient_{$transient}", $value, $expiration, $transient );
    ```

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

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

| Used by | Description | 
| [set_transient()](https://developer.wordpress.org/reference/functions/set_transient/)`wp-includes/option.php` |

Sets/updates the value of a transient.

  |

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

| Version | Description | 
| [4.4.0](https://developer.wordpress.org/reference/since/4.4.0/) | The `$transient` parameter was added. | 
| [3.6.0](https://developer.wordpress.org/reference/since/3.6.0/) | The `$value` and `$expiration` parameters were added. | 
| [3.0.0](https://developer.wordpress.org/reference/since/3.0.0/) | Introduced. |

## User Contributed Notes

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