I'm having some issues with the define_public_hooks. I have multiple actions configure here, and they seem to be working but I'm still getting a warning of call_user_func_array() expects parameter 1 to be a valid callback, no array or string given. Here is the full stack:
component: "Plugin: the-factory"
file: "wp-includes/class-wp-hook.php"
key: "c6fd5f4536badb380ff93edb5bf73c38"
line: 287
message: "call_user_func_array() expects parameter 1 to be a valid callback, no array or string given"
stack: Array(6)
0: "do_action_ref_array('pre_get_posts')"
1: "WP_Query->get_posts()"
2: "WP_Query->query()"
3: "WP_Query->__construct()"
4: "The_Factory_Public->event_list_genre_ajax_filter()"
5: "do_action('wp_ajax_event_list_genre_filter')"
Here are my actions inside the define_public_hooks:
$this->loader->add_action('wp_ajax_event_list_genre_filter', $plugin_public, 'event_list_genre_ajax_filter');
$this->loader->add_action('wp_ajax_nopriv_event_list_genre_filter', $plugin_public, 'event_list_genre_ajax_filter');
I'm having some issues with the define_public_hooks. I have multiple actions configure here, and they seem to be working but I'm still getting a warning of call_user_func_array() expects parameter 1 to be a valid callback, no array or string given. Here is the full stack:
component: "Plugin: the-factory" file: "wp-includes/class-wp-hook.php" key: "c6fd5f4536badb380ff93edb5bf73c38" line: 287 message: "call_user_func_array() expects parameter 1 to be a valid callback, no array or string given" stack: Array(6) 0: "do_action_ref_array('pre_get_posts')" 1: "WP_Query->get_posts()" 2: "WP_Query->query()" 3: "WP_Query->__construct()" 4: "The_Factory_Public->event_list_genre_ajax_filter()" 5: "do_action('wp_ajax_event_list_genre_filter')"
Here are my actions inside the define_public_hooks: $this->loader->add_action('wp_ajax_event_list_genre_filter', $plugin_public, 'event_list_genre_ajax_filter'); $this->loader->add_action('wp_ajax_nopriv_event_list_genre_filter', $plugin_public, 'event_list_genre_ajax_filter');