Title: Fatal Error Admin Order method_exists
Last modified: February 6, 2024

---

# Fatal Error Admin Order method_exists

 *  Resolved [nkals722](https://wordpress.org/support/users/nkals722/)
 * (@nkals722)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-admin-order-method_exists/)
 * You get a fatal error in the admin order screen if the product does not exist
   anymore. In admin_order.php line 20 you are using the method_exists call, but
   if the product does not exist it throws an error since you have to pass an object
   or class. In this case $product is false.
 * Can you please add a check / handle it when a product no longer exists for the
   admin order screen?
   Here is a screenshot of the error in an admin order screen:
   [https://www.dropbox.com/scl/fi/daxsd4uvkk0mx0766iydq/pk_1707240379.png?rlkey=zcoccsfq77oblo9sbpom5x09e&raw=1](https://www.dropbox.com/scl/fi/daxsd4uvkk0mx0766iydq/pk_1707240379.png?rlkey=zcoccsfq77oblo9sbpom5x09e&raw=1)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [nkals722](https://wordpress.org/support/users/nkals722/)
 * (@nkals722)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-admin-order-method_exists/#post-17403259)
 * This also is an issue in the WooDecimalProduct_quantity_Input_Min function in
   the same file. Basically anywhere you call method_exists you need to make sure
   $product is an actual product before calling the method
 *  Plugin Author [wpgear](https://wordpress.org/support/users/wpgear/)
 * (@wpgear)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-admin-order-method_exists/#post-17403405)
 * Hello nkals722
 * Try v.10.33
 * I could not see your screenshot.
 *  Thread Starter [nkals722](https://wordpress.org/support/users/nkals722/)
 * (@nkals722)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-admin-order-method_exists/#post-17403578)
 * Try this:
   [https://snipboard.io/4e3rDR.jpg](https://snipboard.io/4e3rDR.jpg)
 * A specific error message is:
   PHP Fatal error: Uncaught TypeError: method_exists():
   Argument #1 ($object_or_class) must be of type object|string, bool given in /
   path/plugins/decimal-product-quantity-for-woocommerce/includes/admin_order.php:
   20
 * I’ve laid out the exact cause of the issue tho. If it is trying to apply this
   to a product that doesn’t exist, it blows up.
 *  Thread Starter [nkals722](https://wordpress.org/support/users/nkals722/)
 * (@nkals722)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-admin-order-method_exists/#post-17403582)
 * 10.33 Does appear to fix it, thank you.
 *  Thread Starter [nkals722](https://wordpress.org/support/users/nkals722/)
 * (@nkals722)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-admin-order-method_exists/#post-17403585)
 * Marking as resolved

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Fatal Error Admin Order method_exists’ is closed to new replies.

 * ![](https://ps.w.org/decimal-product-quantity-for-woocommerce/assets/icon-256x256.
   png?rev=2512604)
 * [Decimal Product Quantity for WooCommerce](https://wordpress.org/plugins/decimal-product-quantity-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/decimal-product-quantity-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/decimal-product-quantity-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/decimal-product-quantity-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/decimal-product-quantity-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/decimal-product-quantity-for-woocommerce/reviews/)

## Tags

 * [admin](https://wordpress.org/support/topic-tag/admin/)
 * [order](https://wordpress.org/support/topic-tag/order/)

 * 5 replies
 * 2 participants
 * Last reply from: [nkals722](https://wordpress.org/support/users/nkals722/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-admin-order-method_exists/#post-17403585)
 * Status: resolved