Title: deprecated_constructor_run
Published: August 18, 2015
Last modified: February 24, 2026

---

# do_action( ‘deprecated_constructor_run’, string $class_name, string $version, string $parent_class )

## In this article

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

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

Fires when a deprecated constructor is called.

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

 `$class_name`string

The class containing the deprecated constructor.

`$version`string

The version of WordPress that deprecated the function.

`$parent_class`string

The parent class calling the deprecated constructor.

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

    ```php
    do_action( 'deprecated_constructor_run', $class_name, $version, $parent_class );
    ```

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

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

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

Marks a constructor as deprecated and informs when it has been used.

  |

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

| Version | Description | 
| [4.5.0](https://developer.wordpress.org/reference/since/4.5.0/) | Added the `$parent_class` parameter. | 
| [4.3.0](https://developer.wordpress.org/reference/since/4.3.0/) | Introduced. |

## User Contributed Notes

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