Title: Fatal error (fix provided)
Last modified: February 19, 2020

---

# Fatal error (fix provided)

 *  Resolved [rAthus](https://wordpress.org/support/users/rathus/)
 * (@rathus)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-fix-provided/)
 * Hi,
 * Idk why but on some products I have the following error crashing the whole page:
 * `Uncaught Error: Call to a member function is_purchasable() on bool in /var/www/
   html/site/wp-content/plugins/yith-woocommerce-frequently-bought-together/includes/
   class.yith-wfbt-frontend.php on line 162`
 * Easy fix is to replace the concerned line:
 * `if( ! $current->is_purchasable() || ! $current->is_in_stock() ) {`
 * adding that extra condition:
 * `if( ! $current || ! $current->is_purchasable() || ! $current->is_in_stock() ){`
 * It fixes the issue, it probably would be interesting to add it in the next update.
 * Thanks a lot,
 * Arthur

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

 *  Plugin Author [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * (@yithemes)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-fix-provided/#post-12464383)
 * Hi there,
 * Thank you for the code, we have included it in plugin repository 🙂
 *  [matanasow25](https://wordpress.org/support/users/matanasow25/)
 * (@matanasow25)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-fix-provided/#post-12790747)
 * still getting the Fatal Error at some products.
    What i’ve noticed is I’m getting
   it on products that used to have FBT items and then I either trashed the products
   that were included under the FBT or moved them back to the Drafts.
 *  Plugin Author [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * (@yithemes)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-fix-provided/#post-12814425)
 * Hi [@matanasow25](https://wordpress.org/support/users/matanasow25/)
 * thanks for your reporting. We send it to our developers, they’ll do some tests
   about that. We’ll write to you in next day with news about that.
 * YITH
 *  Plugin Author [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * (@yithemes)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-fix-provided/#post-12921267)
 * Hi,
    the issue should be solved with version 1.3.2. Please update to this version
   and let us know if you still having issue with that.
 * Regards.
    YITH

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

The topic ‘Fatal error (fix provided)’ is closed to new replies.

 * ![](https://ps.w.org/yith-woocommerce-frequently-bought-together/assets/icon.
   svg?rev=3055640)
 * [YITH Frequently Bought Together for WooCommerce](https://wordpress.org/plugins/yith-woocommerce-frequently-bought-together/)
 * [Support Threads](https://wordpress.org/support/plugin/yith-woocommerce-frequently-bought-together/)
 * [Active Topics](https://wordpress.org/support/plugin/yith-woocommerce-frequently-bought-together/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yith-woocommerce-frequently-bought-together/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yith-woocommerce-frequently-bought-together/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-fix-provided/#post-12921267)
 * Status: resolved