php-stubs / woocommerce-stubs Goto Github PK
View Code? Open in Web Editor NEWWooCommerce function and class declaration stubs for static analysis
Home Page: https://packagist.org/packages/php-stubs/woocommerce-stubs
License: MIT License
WooCommerce function and class declaration stubs for static analysis
Home Page: https://packagist.org/packages/php-stubs/woocommerce-stubs
License: MIT License
Hi,
we have fatal error:
Fatal error: Trait 'Automattic\WooCommerce\Internal\Admin\CouponsMovedTrait' not found in /abc/vendor/php-stubs/woocommerce-stubs/woocommerce-packages-stubs.php on line 17764
The functions get_available_variations and get_variation_price used when a product is variable is not recognized: "Undefined method" form intelliphpense
Could not scan for classes inside "./wp-content/plugins/woocommerce/vendor/league/container" which does not appear to be a file nor a folder
Hi, great job!
However, I've found out missing is_account_page(), is_checkout(), wc_logout_url() functions. Any ideas how to get it there?
And one more thing, could you help me how to generate my own stubs for Timber plugin (I haven't found a way to make php-stubs-generator work?
Thanks!
Karolina
All null
values have unnecessary backslash
for example 91 line:
protected $meta_data = \null;
My gitlab runner reports
/home/gitlab-runner/builds/hedonia/hedonia/vendor/php-stubs/woocommerce-stubs/woocommerce-stubs.php on line 5892 while loading bootstrap file /home/gitlab-runner/builds/hedonia/hedonia/vendor/php-stubs/woocommerce-stubs/woocommerce-stubs.php:
Class "WP_Widget" not found
Composer install contains
- Installing php-stubs/wordpress-stubs (v6.2.0): Extracting archive
- Installing php-stubs/woocommerce-stubs (v7.6.0): Extracting archive
It seems the generated stub doesnt include the new HPOC classes.
Manually adding woocommerce/src/Internal/DataStores/Orders/
to PHPStan or intelephence (just examples) picks them up.
Should these be included?
woocommerce 6.0 stubs missing
It seems the generated stub doesnt include trait 'Automattic\WooCommerce\Internal\Traits\OrderAttributionMeta'
I'm trying to add the WooCommerce stubs using composer require --dev php-stubs/woocommerce-stubs
but I keep getting an error
Script PHPStan\WordPress\Composer\FixWpStubs::php73Polyfill handling the post-update-cmd event terminated with an exception
Installation failed, reverting ./composer.json to its original content.
[ErrorException]
file_get_contents(.../vendor/giacocorsiglia/
wordpress-stubs/wordpress-stubs.php): failed to open stream: No such file or directory
Any idea why would this happen?
WC_Item_Totals protected abstract function get_values_for_total($field);
then
Class WC_Cart_Totals contains 1 abstract method and must therefore be declared abstract
or implement the remaining methods (WC_Cart_Totals::get_values_for_total)
in /home/travis/build/php-stubs/woocommerce-stubs/woocommerce-stubs.php on line 15012
@herndlm Please help.
...as WC couldn't be installed with Composer.
https://github.com/woocommerce/woocommerce/releases/tag/6.1.0
I'm seeing these errors when running PHPStan with WooCommerce Stubs:
PHP Deprecated: Optional parameter $id declared before required parameter $object is implicitly treated as a required parameter in .../vendor/php-stubs/woocommerce-stubs/woocommerce-stubs.php on line 73141
Is there a way to activate this without composer, for example?
Thanks!
Hi,
First of all thank you for making our life easier, the ACF stubs are working perfectly but not the WooCommerce ones the functions are not recognized at every WooCommerce function i get the Undefined function error message!
Can you please help me with this because it's been months that i am trying to fix it but i cannot find any solution for it!
Thanks and Regards!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.