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

fix: fatal error when WooCommerce Subscriptions is not active #122

Merged
merged 1 commit into from
Sep 16, 2021

Conversation

dkoo
Copy link
Contributor

@dkoo dkoo commented Sep 15, 2021

All Submissions:

Changes proposed in this Pull Request:

Fixes a fatal error with dire consequences, triggered by certain conditions.

Closes #121.

How to test the changes in this Pull Request:

  1. On master, set define( 'NEWSPACK_LISTINGS_SELF_SERVE_ENABLED', true ); in your wp-config.php file.
  2. Install and activate WooCommerce, but not WooCommerce Subscriptions (disable this latter plugin if already installed and active).
  3. Refresh the site and observe a fatal error which prevents the entire site from loading—admin and front-end! 😱
  4. Check out this branch, confirm that the fatal is avoided and that the Self-Serve Listings features are only enabled if both WooCommerce and WooCommerce Subscriptions are active.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@dkoo dkoo added bug Something isn't working [Status] Needs Review labels Sep 15, 2021
@dkoo dkoo requested a review from a team September 15, 2021 20:14
@dkoo dkoo self-assigned this Sep 15, 2021
@dkoo dkoo added this to the Self-Serve Listings milestone Sep 15, 2021
Copy link
Member

@miguelpeixe miguelpeixe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@dkoo dkoo merged commit 16ac166 into master Sep 16, 2021
@dkoo dkoo deleted the fix/fatal-when-missing-wc-subscriptions branch September 16, 2021 22:30
matticbot pushed a commit that referenced this pull request Sep 21, 2021
# [2.5.0-alpha.2](v2.5.0-alpha.1...v2.5.0-alpha.2) (2021-09-21)

### Bug Fixes

* editor crash when switching months in event dates block ([#123](#123)) ([cee0d53](cee0d53))
* fatal error when WooCommerce Subscriptions is not active ([#122](#122)) ([16ac166](16ac166))

### Features

* feature extensions from gdg ([#120](#120)) ([b2c3cc8](b2c3cc8))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 2.5.0-alpha.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Sep 21, 2021
# [2.5.0](v2.4.0...v2.5.0) (2021-09-21)

### Bug Fixes

* editor crash when switching months in event dates block ([#123](#123)) ([cee0d53](cee0d53))
* fatal error when WooCommerce Subscriptions is not active ([#122](#122)) ([16ac166](16ac166))

### Features

* feature extensions from gdg ([#120](#120)) ([b2c3cc8](b2c3cc8))
* **ugc:** automated WC products for self-serve listings ([#117](#117)) ([6a44d86](6a44d86))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 2.5.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fatal error when products are enabled but WC Subscriptions isn't active
3 participants