Skip to content

Commit 89191ad

Browse files
committed
Remove Plugin.php from hook name.
1 parent 84486f4 commit 89191ad

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

WPForms/Sniffs/BaseSniff.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,9 @@ protected function getFullyQualifiedClassName( $phpcsFile ) {
218218

219219
$fqcn = $this->camelToSnake( str_replace( '\\', '', $namespace ) ) . '_' . $class;
220220

221-
$fqcn = str_replace( 'wp_forms', 'wpforms', $fqcn );
221+
// Fix WPForms.
222+
// Remove _plugin for main plugin class, which is usually Plugin.
223+
$fqcn = str_replace( [ 'wp_forms', '_plugin' ], [ 'wpforms', '' ], $fqcn );
222224

223225
$fqcnArr = explode( '_', $fqcn );
224226

composer.lock

Lines changed: 7 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)