Warning: call_user_func_array() expects parameter 1 to be a valid callback
-
HI,
Someone, please suggest to me, how can I fix the following issue.Warning: call_user_func_array() expects parameter 1 to be a valid callback, class ‘Woocommerce_Simple_Features’ does not have a method ‘ci_add_to_cart_bottom_text’ in C:\xampp\htdocs\theme\wp-includes\class-wp-hook.php on line 287.
I have created only 2 files, here both file codes.
main file codes here:if ( in_array('woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option('active_plugins')))) { if ( ! class_exists( 'Woocommerce_Simple_Features') ) { final class Woocommerce_Simple_Features { public function __construct () { $this->register_hooks(); require ( CI_PATH .'/includes/class-wc-custom-fields.php'); } public function register_hooks () { add_action( 'woocommerce_after_add_to_cart_button', array( $this, 'ci_add_to_cart_bottom_text') ); } } } $init = new Woocommerce_Simple_Features (); }
And here my other file code:
if ( ! class_exists( 'Woocommerce_Cart_Text' )) { class Woocommerce_Cart_Text { public function ci_add_to_cart_bottom_text () { echo 'Here goes cart bottom text'; } } }
Please, someone, suggest to me. how can I fix it
Thanks
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Warning: call_user_func_array() expects parameter 1 to be a valid callback’ is closed to new replies.