Title: plugin_loaded
Published: February 22, 2019
Last modified: February 24, 2026

---

# do_action( ‘plugin_loaded’, string $plugin )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/plugin_loaded/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/plugin_loaded/?output_format=md#source)
 * [Changelog](https://developer.wordpress.org/reference/hooks/plugin_loaded/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/hooks/plugin_loaded/?output_format=md#user-contributed-notes)

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

Fires once a single activated plugin has loaded.

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

 `$plugin`string

Full path to the plugin’s main file.

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

    ```php
    do_action( 'plugin_loaded', $plugin );
    ```

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

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

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

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/hooks/plugin_loaded/?output_format=md#user-contributed-notes)󠁿

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/hooks/plugin_loaded/?output_format=md#comment-content-4659)
 2.   [DVHOST_CLOUD](https://profiles.wordpress.org/mahdiebrahimii/)  [  5 years ago  ](https://developer.wordpress.org/reference/hooks/plugin_loaded/#comment-4659)
 3. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fplugin_loaded%2F%23comment-4659)
    Vote results for this note: 0[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fplugin_loaded%2F%23comment-4659)
 4. this plugin is loaded .
 5.     ```php
        add_action( 'plugin_loaded', array( 'wpdocs_class_name', 'instance' ) );
    
        class wpdocs_class_name {
    
            private function __construct() {
                self::init();
            }
    
            public static function instance() {
                static $instance = null;
    
                if ( is_null( $instance ) ) {
                        $instance = new wpdocs_class_name;
                }
    
                return $instance
            }
    
            public function init() {
                wp_die( __( 'Hello World!', 'text-domain' ) );
            }
    
        }
        ```
    
 6.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fplugin_loaded%2F%3Freplytocom%3D4659%23feedback-editor-4659)

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