Skip to content

Commit d822803

Browse files
committed
Fix static method context error in Notices::add()
- Remove static keyword from add() method to allow $this usage - Resolves "Cannot use '$this' in non-object context" error - Method now requires instantiation to call: $notices = new Notices(); $notices->add($args); Fixes #23
1 parent 1b58421 commit d822803

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Admin/Notices.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function __construct() {
3838
* @since <next-version>
3939
* @param array $args The notice arguments.
4040
*/
41-
public static function add( array $args ) {
41+
public function add( array $args ) {
4242
$args = wp_parse_args(
4343
$args,
4444
array(

0 commit comments

Comments
 (0)