• Resolved Vishal Patel

    (@vishalpatel315)


    Hi,

    After latest plugin update, I am getting this error.

    Fatal error: Can’t use function return value in write context in /home/hotwatersystem/public_html/wp-content/plugins/perfect-woocommerce-brands/classes/admin/class-pwb-coupon.php on line 50

    Can you please resolve it asap?

    Cheers,
    Vishal Patel

Viewing 2 replies - 1 through 2 (of 2 total)
  • I had the same issue. Here is what I did in order to fix it. Although this is a temporary fix until the author releases a patch!

    Open that php file and look for line 50.

    Replace this:
    if( !empty( array_intersect( $selected_brands, $product_brands ) ) ) return true;

    With this:

    $array_intersect = array_intersect( $selected_brands, $product_brands );
    if( !empty( $array_intersect ) ) return true;

    He used a function inside an if statement but you have to use a variable instead.

    Hope this helps.

    Plugin Contributor titodevera

    (@titodevera)

    The new version 1.5.1 fix this error, that affects only to old php versions (< php 5.5)

    Thanks for using PWB! ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Plugin could not be activated because it triggered a fatal error.’ is closed to new replies.