Title: Fatal error on order cancellation – missing method in Subscription plugin
Last modified: October 29, 2025

---

# Fatal error on order cancellation – missing method in Subscription plugin

 *  Resolved [Fred_Konga](https://wordpress.org/support/users/fred_konga/)
 * (@fred_konga)
 * [5 months, 3 weeks ago](https://wordpress.org/support/topic/fatal-error-on-order-cancellation-missing-method-in-subscription-plugin/)
 * Hello YITH support team,
 * I’m facing a **critical fatal error** with **YITH WooCommerce Subscription** 
   whenever an order is cancelled. When changing the status from _Completed_ to 
   _Cancelled_, WordPress crashes with the following error:
 * > `PHP Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 (
   > $callback) must be a valid callback, class YWSBS_Subscription_Order does not
   > have a method "cancel_subscriptions" in /wp-includes/class-wp-hook.php on line
   > 326`
 * This indicates that your plugin registers the following invalid hook:
   `add_action('
   woocommerce_order_status_cancelled', ['YWSBS_Subscription_Order', 'cancel_subscriptions']);`
   However, the class `YWSBS_Subscription_Order` does **not implement** the `cancel_subscriptions()`
   method, which causes a **TypeError** and a complete backend crash during order
   cancellation.
 * To keep my site stable, I had to create a temporary workaround that removes this
   faulty hook before execution. The issue is easily reproducible on any WooCommerce
   order with a subscription product.
 * **Environment:**
    - WordPress 6.7.1
    - WooCommerce (latest)
    - YITH WooCommerce Subscription (latest)
    - PHP 8.3
    - Theme: Themify Builder-based
 * **Expected behavior:** cancelling an order should deactivate the related subscription
   gracefully, without triggering a fatal error.
 * Please escalate this issue to your development team — it’s a blocking problem
   under PHP 8+. I can provide admin access or detailed logs if needed.
 * Thank you,
   **Frédéric Le Guen**Founder – [Excel-Exercice.com](https://excel-exercice.com)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffatal-error-on-order-cancellation-missing-method-in-subscription-plugin%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/yith-woocommerce-subscription/assets/icon-128x128.gif?rev
   =3146401)
 * [YITH WooCommerce Subscription](https://wordpress.org/plugins/yith-woocommerce-subscription/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yith-woocommerce-subscription/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yith-woocommerce-subscription/)
 * [Active Topics](https://wordpress.org/support/plugin/yith-woocommerce-subscription/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yith-woocommerce-subscription/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yith-woocommerce-subscription/reviews/)

## Tags

 * [cancel](https://wordpress.org/support/topic-tag/cancel/)
 * [Crash](https://wordpress.org/support/topic-tag/crash/)

 * 0 replies
 * 1 participant
 * Last reply from: [Fred_Konga](https://wordpress.org/support/users/fred_konga/)
 * Last activity: [5 months, 3 weeks ago](https://wordpress.org/support/topic/fatal-error-on-order-cancellation-missing-method-in-subscription-plugin/)
 * Status: resolved