I have a quick question about the /lib/extras.php.
I understand that I can put here my custom hooked functions, this works, but only sometimes.
It seem that some filter/action hook aren’t working if they’re used from extras.php. They only work from the themefunction.php.
The throwed error is like below : Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'woo_add_to_cart_check_custom' not found or invalid function name in ...\project\wp-includes\plugin.php on line 235
Is there something i didnt understood about this file ? Or is it used but for some special hooks ?
Last question, they said on the page you sent me that if for example i need to use wp_query() i need to precise root namespace (or throught “use” statement).
But it seem i dont need it to use the wordpress get_option() function.
How do we know wich function (WP core, i think that plugin function always need namespacing) need to have the root namespace specified ?