Please submit a private ticket if you need to share sensitive information, such as license details and admin credentials.

Okay
  Public Ticket #3836405
Update causing Critical Error
Open

Comments

  • Robert started the conversation

    When I installed the latest update for WPC Buy Now Button for Woocommerce it caused a Critical Error on my website. I had to deactivate the plugin to be able to use my site.

    Error details:

    An error of type E_PARSE was caused in line 691 of the file /home/deadw8au/allmyautoparts.com.au/wp-content/plugins/wpc-buy-now-button/wpc-buy-now-button.php. Error message: syntax error, unexpected '=>' (T_DOUBLE_ARROW)

    can this issue be fixed so I can use the plugin or do I need to delete the plugin?

    Thanks

  •  1,404
    Dustin replied

    Hi Robert,

    It works as usual on our demo page: https://demo.wpclever.net/wpcstore/product/blank-t-shirt/, so I have no idea why it happened on your site.

    You can downgrade our plugin to the previous version, 2.1.1, here: https://wordpress.org/plugins/wpc-buy-now-button/advanced/

    1906106736.png

    Best regards,
    Dustin

  • Brian replied

    My client updated her website over the weekend and also experienced a critical error with version 2.1.3.

    Error Details:

    PHP Parse error:  syntax error, unexpected '=>' (T_DOUBLE_ARROW) in /home/[redacted].cloudwaysapps.com/[redacted]/public_html/wp-content/plugins/wpc-buy-now-button/wpc-buy-now-button.php on line 684

    Here's the code it's referring to, specifically the 'checkout' line:

    $redirect = match ( $redirect_type ) {    
      'checkout' => wc_get_checkout_url(),    
      'cart' => wc_get_cart_url(),    
      default => self::get_setting( 'redirect_custom', '/' )
    };


  •  1,404
    Dustin replied

    Thanks for the detailed information!

    Please update our plugin to the latest version 2.1.4; we fixed it :)

    Best regards,
    Dustin