Closed manzurahammed closed 2 months ago
[!note]
WCS_Related_Order_Store_Cached_CPT::delete_relations()
is only currently called in 1 place (code link) and it just passes the result ofwc_get_order()
so I think we will just need to be more defensive there.
Closed by 4648-gh-woocommerce/woocommerce-subscriptions
Describe the bug
Found this fatal error in our store.
Uncaught exception 'TypeError' with message 'WCS_Related_Order_Store_Cached_CPT::delete_relations(): Argument #1 ($order) must be of type WC_Order, bool given, called in /var/www/wp-content/plugins/woocommerce-subscriptions/includes/switching/class-wc-subscriptions-switcher.php on line 791' in /var/www/wp-content/plugins/woocommerce-subscriptions/vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-related-order-store-cached-cpt.php:189
Product impact
Woocommerce Subscriptions plugin