Skip to content

Commit

Permalink
Corrects action for script enqueue
Browse files Browse the repository at this point in the history
  • Loading branch information
alexstandiford committed Jun 22, 2021
1 parent ac261c7 commit cc877a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Enqueue_Admin_Script.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Enqueue_Admin_Script extends Middleware {

function do_actions() {
if ( $this->loader_item instanceof Script ) {
add_action( 'admin_enqueue_script', [ $this->loader_item, 'enqueue' ] );
add_action( 'admin_enqueue_scripts', [ $this->loader_item, 'enqueue' ] );
} else {
underpin()->logger()->log( 'warning', 'rest_middleware_action_failed_to_run', 'Middleware action failed to run. Rest_Middleware expects to run on a Script loader.', [
'loader' => get_class( $this->loader_item ),
Expand Down

0 comments on commit cc877a9

Please sign in to comment.