Intelliphense.?
Hi
I must be doing something wrong.? The autocomplete works, but Intelliphense shows the functions as not defined. What am I missing?
Thanks
Same thing here, did you get it working?
No 😒
Any news on this?
I am developing in a plugin folder in an active WordPress install and after a lot of research I now have a "settings.json" file in the ".vscode" folder in the plugin's folder and that file contains:
{ "intelephense.environment.includePaths": [ "../woocommerce" ] }
If you are working in a workspace, the setting should be in the workspace file.
To set it up in the UI: File -> Preferences -> Settings Select "Workspace" and search for: "intelephense environment include paths" then "Add Item" "../woocommerce" If you are developing a theme, it would probably be "../../plugins/woocommerce" - I didn't test it, but I think that's what it should be.
...and this is in addition to this plugin...
@MarkCanada I added
/Users/me/code/woocommerce-stubs
for intelephense environment include paths as path to WooCommerce stubs.
Then I restarted VS Studio Code. Did however still see warnings like
Undefined method 'get_product_id'.intelephense(P1013)
Undefined method 'get_items'.intelephense(P1013)
Perhaps because the stubs are outside the project directory reading https://github.com/bmewburn/vscode-intelephense/issues/1798