• Resolved ftroitero

    (@ftroitero)


    Hi I’m getting the following error while trying to use this plugin:

    https://publishpress.com/knowledge-base/custom-requirements-plugin/

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, class ‘PublishPressChecklistsBootstrap\Addon’ not found in /var/www/wordpress-website/public/wp-includes/class-wp-hook.php on line 307

    Here is the function the error is pointing to:

    public function apply_filters( $value, $args ) {
    		if ( ! $this->callbacks ) {
    			return $value;
    		}
    		$nesting_level = $this->nesting_level++;
    		$this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
    		$num_args                           = count( $args );
    		do {
    			$this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] );
    			$priority                                 = $this->current_priority[ $nesting_level ];
    
    			foreach ( $this->callbacks[ $priority ] as $the_ ) {
    				if ( ! $this->doing_action ) {
    					$args[0] = $value;
    				}
    				// Avoid the array_slice() if possible.
    				if ( 0 == $the_['accepted_args'] ) {
    					$value = call_user_func( $the_['function'] );
    				} elseif ( $the_['accepted_args'] >= $num_args ) {
    					$value = call_user_func_array( $the_['function'], $args );
    				} else {
    					$value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int) $the_['accepted_args'] ) );
    				}
    			}
    		} while ( false !== next( $this->iterations[ $nesting_level ] ) );
    		unset( $this->iterations[ $nesting_level ] );
    		unset( $this->current_priority[ $nesting_level ] );
    		$this->nesting_level--;
    		return $value;
    	}

    The WordPress version is 6.0.2.

    Will this plugin work with this WP version? Any suggestions on how I could make it work?
    Many thanks

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Create Custom Tasks With a Plugin’ is closed to new replies.