V
V
Vasily Khryagin2021-02-01 15:41:46
WordPress
Vasily Khryagin, 2021-02-01 15:41:46

What causes this error in wordpress?

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'woocommerce_before_add_to_cart_form' not found or invalid function name in /home/spektrde/fortis.spektrdev.com/wp-includes/class-wp-hook.php on line 287

on line 287 is the following code
$value = call_user_func_array( $the_['function'], $args );

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2021-02-01
@podkudahka

Because there is a hook with a callback function somewhere woocommerce_before_add_to_cart_form, but it does not exist.
The problem is not really class-wp-hook.php. This is where the error occurs, and where this hook is created.
The call stack can help you find this place.
Might help:
https://gist.github.com/jrfnl/5925642
https://wordpress.org/support/topic/php-warning-ca...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question