• Resolved rAthus

    (@rathus)


    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

    (@yithemes)

    Hi there,

    Thank you for the code, we have included it in plugin repository ??

    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

    (@yithemes)

    Hi @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

    (@yithemes)

    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.