-
Notifications
You must be signed in to change notification settings - Fork 69
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
Fatal error in subscriptions-core reference to WC_Subscriptions
class in WCS_PayPal
class
#3245
Fatal error in subscriptions-core reference to WC_Subscriptions
class in WCS_PayPal
class
#3245
Comments
Possibly need Paypal gateway installed and configured - I see |
That class |
Possibly requires |
Stack trace:
|
Based on that call stack it looks like this is happening when preparing a request to the PayPal API, in subs-core code. So that's a bug - WC Subscriptions pro is not active, so all subscriptions should use WC Pay (or manual/paused). |
Another report in 32333443-hc. SSR posted below. They are on PHP 7.2.34.
|
When they came back to chat, we walked through installing 3.1, which solved the issue. |
WC_Subscriptions
class in WCS_PayPal
class
Marking this as critical until we confirm how common this is. |
Pulling in this comment from the first PR proposal so the context is included here too. The reason we init PayPal in core is for downgrade reasons. If a WC Subscriptions store previously had PayPal Subscriptions, and they downgrade to WC Payments we need to be able to send the request to cancel those subscriptions at PayPal. I think the end game for loading PayPal in core is a bit more complex. Something like only load it if there are PayPal Subscriptions left on the site. So I think to patch this error we can either:
The only reason why I think 2 might be a consideration is because I personally haven't tested the flow of having a PayPal Subscription, downgrading, switching to WC Pay Subscriptions, and confirming that PayPal cancels the old subscription. But I'd generally be in favour of going with 1, just in case - as a safer option. Original comment: Automattic/woocommerce-subscriptions-core#24 (comment) |
As reported in 32458900-HC, the user updated to 3.2.1, but WC Pay backend threw an empty screen. Screenshot: https://d.pr/i/MWJlli They temporarily used version 3.0.0, all working SSR with version 3.2.1 active` ### WordPress Environment ###WordPress address (URL): https://www.lumengy.com Server EnvironmentServer Info: Apache SUHOSIN Installed: – DatabaseWC Database Version: 5.8.0 Post Type Countsaiosrs-schema: 1 SecuritySecure connection (HTTPS): ✔ Active Plugins (19)Back In Stock Notifier for WooCommerce | WooCommerce Waitlist Pro: by codewoogeek – 2.4.1 Inactive Plugins (1)Smush: by WPMU DEV – 3.9.1 Dropin Plugins (1)advanced-cache.php: advanced-cache.php Must Use Plugins (7)Elementor Safe Mode: by Elementor.com – 1.0.0 SettingsAPI Enabled: – Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) Connected to WooCommerce.com: ✔ WC PagesShop base: #8 - /shop/ ThemeName: Woodmart TemplatesOverrides: woodmart/woocommerce/archive-product.php ` |
Fixed in #3252 (will be released in WooCommerce Payments 3.2.2) |
Describe the bug
A few users have reported the error
Uncaught Error: Class 'WC_Subscriptions' not found
coming from/wp-content/plugins/woocommerce-payments/vendor/woocommerce/subscriptions-core/includes/gateways/paypal/class-wcs-paypal.php:630
.https://wordpress.org/support/topic/fatal-php-errors-in-version-3-2-0-php-7-2-34/#post-15016289
My understanding is that
WC_Subscriptions
is not a class defined in subscriptions-core, so references to it in subscriptions-core should be removed.To Reproduce
Haven't yet been able to reproduce.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Server Info: nginx
PHP Version: 7.3.31
PHP Post Max Size: 2 GB
PHP Time Limit: 1200
PHP Max Input Vars: 6144
cURL Version: 7.78.0
OpenSSL/1.1.1d
Active Plugins (26)
Akismet Anti-Spam: by Automattic – 4.2.1
AMP: by AMP Project Contributors – 2.1.4
CoBlocks: by GoDaddy – 2.18.1
Facebook for WooCommerce: by Facebook – 2.6.5
WordPress.com Editing Toolkit: by Automattic – 3.17756
GA Google Analytics: by Jeff Starr – 20210719
Google Listings and Ads: by WooCommerce – 1.5.1
Site Kit by Google: by Google – 1.44.0
Gutenberg: by Gutenberg Team – 11.7.1
Health Check & Troubleshooting: by The WordPress.org community – 1.4.5
Jetpack: by Automattic – 10.3-beta
Layout Grid: by Automattic – 1.7
Page Optimize: by Automattic – 0.5.1
Crowdsignal Polls & Ratings: by Automattic
Inc. – 3.0.1
Rearrange Woocommerce Products: by Aslam Doctor – 3.0.4
Splitit - WooCommerce plugin: by IWD – 3.0.1
Tax Rate Upload: by Adam Bowen – 2.4.5
Braintree for WooCommerce Payment Gateway: by WooCommerce – 2.6.1
WooCommerce Stripe Gateway: by WooCommerce – 5.7.0
Booster for WooCommerce: by Pluggabl LLC – 5.4.8
WooCommerce PayPal Payments: by WooCommerce – 1.6.1
WooCommerce Square: by WooCommerce – 2.6.0
WooCommerce: by Automattic – 5.8.0
Yoast SEO: by Team Yoast – 17.4
Wp Edit Password Protected: by Noor alam – 1.1.8
WP-Spreadplugin: by Thimo Grauerholz – 4.8.5
Inactive Plugins (5)
Classic Editor: by WordPress Contributors – 1.6.2
UsersWP - ReCaptcha: by AyeCode Ltd – 1.3.10
WooCommerce Payments: by Automattic – 3.2.0
WooCommerce PayPal Checkout Gateway: by WooCommerce – 2.1.3
WooCommerce Shipping & Tax: by WooCommerce – 1.25.19
Dropin Plugins (2)
advanced-cache.php: advanced-cache.php
object-cache.php: Memcached
Must Use Plugins (2)
Health Check Troubleshooting Mode: by – 1.7.2
WP.com Site Helper: by –
The text was updated successfully, but these errors were encountered: