Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer package breaks #560

Open
jmotes opened this issue Oct 2, 2021 · 3 comments
Open

Composer package breaks #560

jmotes opened this issue Oct 2, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@jmotes
Copy link
Contributor

jmotes commented Oct 2, 2021

Describe the bug

I'm new to composer, but it seems somehow composer is autoloading the wrong namespace when calling the setup_minor_integrations method.

 Fatal error: Uncaught Error: Call to undefined function WPGraphQL\WooCommerce\Functions\setup_minor_integrations() in C:\Users\jonat\Documents\GitHub\gravity\backend\plugins\wp-graphql-woocommerce\includes\class-wp-graphql-woocommerce.php on line 197

To Reproduce

composer require wpackagist-plugin/wp-graphql
composer require wpackagist-plugin/woocommerce
composer require wp-graphql/wp-graphql-woocommerce

Go to WP admin and activate the plugin to see the error.

Expected behavior
Plugin to activate successfully.

Screenshots
image

Plugin Versions

  • WooGraphQL Version: 0.10.4
  • WPGraphQL Version: 1.6.5
  • WordPress Version: 5.8.1
  • WooCommerce Version: 5.7.1

Additional context
If I use composer to remove wp-graphql-woocommerce and install the exact same version from the zip file, it works fine.

@jmotes
Copy link
Contributor Author

jmotes commented Oct 5, 2021

@jasonbahl sorry to tag you, but do you know anyone that would be interested in assisting with this? I saw some participants in previous composer bugs but I cannot tag them:

#202
#203
#246

I would love to help out as well if you can point me in the right direction! My knowledge of composer is rather limited at the moment so I'm not sure where to start.

@kidunot89 kidunot89 added the bug Something isn't working label Oct 6, 2021
@GPorter43
Copy link

I had a very similar problem I solved it by using the terminal and going into the folder for wpgraphql and wp-graphql/wp-graphql-woocommerce and running "Composer Install" then activate them in that order.
I am quite new to Composer also but the gist i get is that the dependancies they require don't get installed, it may be worth deleting the Composer.lock file before installing

@jmotes
Copy link
Contributor Author

jmotes commented Oct 20, 2021

@GPorter43 running composer install inside the wp-graphql-woocommerce directory before activating the extension did solve the issue for me. Thank you so much!

I guess this is still a bug though so will leave for @kidunot89 to decide whether to leave open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants